Re: [PATCH v2] diff: vary default prefix depending on what are compared
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Aug 20, 2008, 09:06 UTC
- Message-ID
- <m3k5ecrr6j.fsf@localhost.localdomain>
- In-Reply-To
- <7vljysru9b.fsf_-_@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> With a new configuration "diff.mnemonicprefix", "git diff" shows the > differences between various combinations of preimage and postimage trees > with prefixes different from the standard "a/" and "b/". Hopefully this > will make the distinction stand out for some people. > > "git diff" compares the (i)ndex and the (w)ork tree; > "git diff HEAD" compares a (c)ommit and the (w)ork tree; > "git diff --cached" compares a (c)ommit and the (i)ndex; > "git diff --no-index a b" compares two non-git things (1) and (2). > > Because these mnemonics now have meanings, they are swapped when reverse > diff is in effect and this feature is enabled.
> > + diff_set_mnemonic_prefix(&revs->diffopt, "o/", "w/"); > +
Somehow you lost in the commit description and in the added documentation the (o)bject prefix (explicitely naming 'blob' object, for example HEAD:a, or :2:b, or 7a7ff130a34942506e6068105ac5946c9404bf18)
It is also not obvious IMVHO that when comparing two trees (two commits) git uses default 'a/'..'b/' prefixes.
-- Jakub Narebski Poland ShadeHawk on #git