align git diff a..b semantics with git log a..b

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

 



Hi,

Currently, git-diff accepts

	git-diff A..B

syntax, and the output seems to be equivalent of 'git-diff A B'.

IMHO, this conflicts with A..B semantics defined for git-log family of commands.
Consider following tree

O--X--Y--A1--A2  (a)
       \
        B1--B2  (b)

The command 'git log a..b' will show B1,B2, so I would find it
intuitive (and useful) to have 'git diff a..b' show B1+B2,
rather than -A2-A1+B1+B2.

So, I suggest to change semantics of 'git diff a..b'
to 'git diff `git-merge-base a b` b'.

I could contribute the documentation change if the idea is accepted and implemented.

Thanks a lot!
-
: 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]