Re: [PATCH 2/3] checkout, commit: remove confusing assignments to rev.abbrev
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 28, 2010, 17:23 UTC
- Message-ID
- <7vhbjj5xmw.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1280311304.2378.64.camel@wpalmer.simply-domain>
Will Palmer <wmpalmer@gmail.com> writes:
Show 6 quoted lines
> Here's what I propose: > - #define NO_ABBREV 40 > - replace all instances of revs->abbrev = 40 and revs->abbrev = 0 with > revs->abbrev = NO_ABBREV > > That will at least make it explicit and consistent.
That is a good idea. I think abbrev == 0 in the early days used to mean "use the compiled-in default, whatever it is" but somehow some codepaths mistakenly used it to mean "please do not abbreviate" (my fault).
> ... And an > undefined value should (I think obviously) be interpreted as > DEFAULT_ABBREV, since that's what the word "DEFAULT" actually comes > from.
We would probably need to be a bit careful here. By default plumbing commands do not abbreviate, while we do want the default abbreviation in our Porcelains.