Web lists-archives.com

Re: Deprecating git diff ..; dealing with other ranges




Denton Liu <liu.denton@xxxxxxxxx> writes:

> =>		content="$(git diff HEAD^! | tail -n 1)"
> ...
> It gets caught in my attempt to only deprecate ..'s. Technically, it's
> undocumented behaviour and it only happens to work because git-diff
> accept ranges but it doesn't operate in an intuitive way.

It reuses the same notation as that is used for ranges, but makes
the notation mean something entirely different from ranges, because
"diff" is about two endpoints.

And "git diff ^A B" (or "git diff B ^A") works like "git diff A B".
So does "git diff A^!", for a single-parent commit A, work like "git
diff A^ A".