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

Re: [RFC PATCH] GIT-VERSION-GEN: set --abbrev=9 to match auto-scaling

From
Jeff King <peff@peff.net>
Date
Dec 6, 2016, 14:03 UTC
Message-ID
<20161206140259.lly76xkvsj7su3om@sigill.intra.peff.net>
In-Reply-To
<xmqqbmwq5k7k.fsf@gitster.mtv.corp.google.com>
On Mon, Dec 05, 2016 at 10:01:19AM -0800, Junio C Hamano wrote:
Show 15 quoted lines
> > That said, I think the right patch may be to just drop --abbrev
> > entirely.
> > ...
> > I think at that point it was a noop, as 7 should have been the default.
> > And now we probably ought to drop it, so that we can use the
> > auto-scaling default.
> 
> Yeah, I agree.
> 
> It does mean that snapshot binaries built out of the same commit in
> the same repository before and after a repack have higher chances of
> getting named differently, which may surprise people, but that
> already is possible with a fixed length if the repacking involves
> pruning (albeit with lower probabilities), and I do not think it is
> a problem.

I think that the number is already unstable, even with --abbrev, as it just specifies a minimum. So any operation that creates objects has a possibility of increasing the length. Or more likely, two people describing the same version may end up with different strings because they have different objects in their repositories (e.g., I used to carry's trast's git-notes archive of the mailing list which added quite a few objects).

I agree that having it change over the course of a repack is slightly _more_ surprising than those cases, but ultimately the value just isn't stable.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 12 in “GIT-VERSION-GEN: set --abbrev=9 to match auto-scaling”
  1. GIT-VERSION-GEN: set --abbrev=9 to match auto-scalingRamsay Jones, Dec 4, 2016
  2. Jeff KingDec 5, 2016
  3. Ramsay JonesDec 5, 2016
  4. Junio C HamanoDec 5, 2016
  5. Ramsay JonesDec 5, 2016
  6. Junio C HamanoDec 5, 2016
  7. Ramsay JonesDec 5, 2016
  8. Junio C HamanoDec 5, 2016
  9. Jeff KingDec 6, 2016
  10. Junio C HamanoDec 6, 2016
  11. Jeff KingDec 6, 2016
  12. Ramsay JonesDec 6, 2016

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.