list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* avoiding fetching specific refs from a remote
@ 2020-08-04 21:53 Jacob Keller
  2020-08-05  6:37 ` Jeff King
  0 siblings, 1 reply; 10+ messages in thread
From: Jacob Keller @ 2020-08-04 21:53 UTC (permalink / raw)
  To: Git mailing list


I've recently had a few repositories switch their default branch from
master to main. Currently, for backwards compatibility these
repositories have kept master around as a synonym for main. It's
unclear when this will be removed.

This results in the annoying completion behavior where:

$git checkout ma<TAB>

Essentially, because both main and master have similar names, tab
completion requires remembering to type one additional character than
I am used to.

I'd like to be able to customize my pull so that I either (a) exclude
the reference when performing a fetch, or (b) exclude the reference
when tab completing.

I don't know if there is any mechanism already in place to do this, so
I'm trying to figure out which one would be most preferable on the

something like adding a remote.<name>.excludeRefs which would allow
specifying a set of references to exclude from matching the refspec..

I realize I could customize the refspec to list the set of things I
want, but then I would miss any potential future branches until I
updated my remote config again.

I would like to be able to remove this annoyance for myself and colleagues.

It seems to me the easiest solution would be the sort of exclude
option, as this enables generally skipping out on specific refs, and
could be useful beyond just this initial impetus.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-08-13  8:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-04 21:53 avoiding fetching specific refs from a remote Jacob Keller
2020-08-05  6:37 ` Jeff King
2020-08-05 16:22   ` Junio C Hamano
2020-08-05 20:34     ` Jacob Keller
2020-08-05 20:34     ` Jeff King
2020-08-05 20:31   ` Jacob Keller
2020-08-05 22:12   ` Philippe Blain
2020-08-07  8:04     ` Eric Wong
2020-08-12 22:04   ` Jacob Keller
2020-08-13  8:48     ` Jeff King

Code repositories for project(s) associated with this inbox:

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).