Re: [PATCH v2] diff: vary default prefix depending on what are compared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux