Re: [RFC PATCH] wt-status: show amended content when verbose

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

 



Pratyush Yadav <me@xxxxxxxxxxxxxxxxx> 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
         \
          B


where

	O = HEAD^ = HEAD@{1}^
	A = HEAD@{1}		- HEAD before the amend
	B = HEAD		- result of the amend

I 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.

>>  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.



[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