git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: avoiding fetching specific refs from a remote

From
Jacob Keller <jacob.keller@gmail.com>
Date
Aug 5, 2020, 20:34 UTC
Message-ID
<CA+P7+xrAyCgYyh4_WM5hcBv8+WXaRvN_Cf6nqz4ruO4oHzwjvQ@mail.gmail.com>
In-Reply-To
<xmqq1rkloyeg.fsf@gitster.c.googlers.com>
On Wed, Aug 5, 2020 at 9:22 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
>
> Jeff King <peff@peff.net> writes:
>
> >> Essentially, because both main and master have similar names, tab
> >> completion requires remembering to type one additional character than
> >> I am used to.
> >
> > Heh, I didn't think anybody considered that implication so far; the fact
> > that they were similar names has generally been considered a positive. I
> > agree it would be annoying.
>
> FWIW, I've been saying that 'maint' will become harder to type all
> along ever since I heard 'main'.
>
> https://lore.kernel.org/git/xmqqtuz9tq30.fsf@gitster.c.googlers.com/
>

Right. I'm generally for the name change, and I like having the remote honor the old name as a compatibility at least for some duration.

Show 19 quoted lines
> > This is definitely a reasonable thing to want, and it has come up off
> > and on over the years. One search term for the list archive is "negative
> > refspecs", though it turns up a lot of useless hits when the two words
> > are not directly adjacent.
> >
> > This old thread might be worth reading:
> >
> >   https://lore.kernel.org/git/20140124090104.GA396@x4/
> >
> > and there is even a patch in there:
> >
> >   https://lore.kernel.org/git/20140125013433.GA22336@sigill.intra.peff.net/
> >
> > but I didn't go over it carefully enough to know whether it is utter
> > trash, or something that could be used as a starting point.
>
> I think the idea is interesting.  I sometimes find negative
> pathspecs quite useful, and I suspect negative refspecs would also
> be.

I've found negative pathspecs incredibly useful in some contexts, (with my only issue being to remember that if you specify a negative pathspec, you must also specify a positive one i.e. "." or something)

I think I'll try to revive that one patch Peff pointed out and then see if it makes sense or needs to be redone.

Previous: Junio C HamanoNext: Jeff King
Message 4 of 10 in “avoiding fetching specific refs from a remote”
  1. Jacob KellerAug 4, 2020
  2. Jeff KingAug 5, 2020
  3. Junio C HamanoAug 5, 2020
  4. Jacob KellerAug 5, 2020
  5. Jeff KingAug 5, 2020
  6. Jacob KellerAug 5, 2020
  7. Philippe BlainAug 5, 2020
  8. Eric WongAug 7, 2020
  9. Jacob KellerAug 12, 2020
  10. Jeff KingAug 13, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.