Re: [RFC PATCH] wt-status: show amended content when verbose
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 20, 2019, 01:04 UTC
- Message-ID
- <xmqqv9rfe4th.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20191119145632.xi6zebglzu4lbgcq@yadavpratyush.com>
Pratyush Yadav <me@yadavpratyush.com> writes:
> I'm afraid I don't follow what exactly this would do, and how it would > help differentiate between the "what the amend does" and "what the > amended commit does".
The resulting history would be
O---A
\
Bwhere
O = HEAD^ = HEAD@{1}^
A = HEAD@{1} - HEAD before the amend
B = HEAD - result of the amendI wonder if
git diff -c B O A
(with possibly different permutations of three revisions) is a reasonable way to show what the final state is and where it differs from the previous one (i.e. HEAD@{1}) and the original one (i.e. HEAD^) in the combined diff format.
Show 6 quoted lines
>> 2. would it make sense to show the differences between
>> HEAD^..HEAD@{1} and between HEAD^..HEAD using the range-diff
>> machinery.
>
> I considered using range-diff, but didn't go with it because of my
> personal dislike for range-diff.For a single-commit amend, the normal diff between HEAD@{1} and HEAD would be far easier to read than such a range-diff, I would think.