Re: [PATCHv6 4/4] status: better advices when splitting a commit (during rebase -i)

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

 




Phil Hord <phil.hord@xxxxxxxxx> a écrit :

On Sun, Jun 3, 2012 at 2:30 PM, Kong Lucien <Lucien.Kong@xxxxxxxxxxxxxxx> wrote:
Add new informative help messages at the output of 'git status' when
the user is splitting a commit. The code figures this state by
comparing the contents of the following files in the .git/ directory:
         - HEAD
         - ORIG_HEAD
         - rebase-merge/amend
         - rebase-merge/orig-head

Signed-off-by: Kong Lucien <Lucien.Kong@xxxxxxxxxxxxxxx>
Signed-off-by: Duperray Valentin <Valentin.Duperray@xxxxxxxxxxxxxxx>
Signed-off-by: Jonas Franck <Franck.Jonas@xxxxxxxxxxxxxxx>
Signed-off-by: Nguy Thomas <Thomas.Nguy@xxxxxxxxxxxxxxx>
Signed-off-by: Nguyen Huynh Khoi Nguyen <Huynh-Khoi-Nguyen.Nguyen@xxxxxxxxxxxxxxx>
Signed-off-by: Moy Matthieu <Matthieu.Moy@xxxxxxxxxxxxxxx>
---
The second test added by this patch fails because the case in which
the user amend the last commit through rebase -i is not taken care of.
We infer that the user would directly run "git commit --amend" instead
of amending it with a rebase -i.


Maybe this is safe and logical for most workflows, or maybe this is a
convenience that makes this patch possible (I did not read the patch
yet).  But I know that I sometimes use rebase-i instead of
commit--amend because I did not realize the patch I am fixing is the
most recent one until after continuing, or because the patch I am
amending was moved into the most-recent position during the rebase-i
itself.

Right, This case has to be taken care of. It will need some work as
it's quite difficult to distinguish the current state after doing
a reset HEAD^ or doing a commit --amend when the rebase-merge/amend
is set on the last commit.


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