diff options
author | Dmitry Potapov <dpotapov@gmail.com> | 2008-09-09 16:05:26 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-09-09 08:57:21 -0700 |
commit | c14c3c82da9a46c65008060ad8e6dacef1a24ba9 (patch) | |
tree | 91928ab08eef039845452e471e9b88233ab94ea9 /merge-file.c | |
parent | git-rebase-interactive: do not squash commits on abort (diff) | |
download | tgif-c14c3c82da9a46c65008060ad8e6dacef1a24ba9.tar.xz |
git-rebase--interactive: auto amend only edited commit
"git rebase --continue" issued after git rebase being stop by "edit"
command is trying to amend the last commit using stage changes. However,
if the last commit is not the commit that was marked as "edit" then it
can produce unexpected results.
For instance, after being stop by "edit", I have made some changes to
commit message using "git commit --amend". After that I realized that
I forgot to add some changes to some file. So, I said "git add file"
and the "git rebase --continue". Unfortunately, it caused that the new
commit message was lost.
Another problem is that after being stopped at "edit", the user adds new
commits. In this case, automatic amend behavior of git rebase triggered
by some stage changes causes that not only that the log message of the
last commit is lost but that it will contain also wrong Author and Date
information.
Therefore, this patch restrict automatic amend only to the situation
where HEAD is the commit at which git rebase stop by "edit" command.
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-file.c')
0 files changed, 0 insertions, 0 deletions