summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6828399)
raw | patch | inline | side by side (parent: 6828399)
author | Jan Harkes <jaharkes@cs.cmu.edu> | |
Sat, 17 Dec 2005 06:01:06 +0000 (01:01 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 17 Dec 2005 06:28:19 +0000 (22:28 -0800) |
git-am --skip does not unpack the next patch and ends up reapplying the
old patch, believing that it is the new patch in the sequence.
If the old patch applied successfully it will commit it with the
supposedly skipped log message and ends up dropping the following patch.
If the patch did not apply the user is left with the conflict he tried
to skip and has to unpack the next patch in the sequence by hand to get
git-am back on track.
By clearing the resume variable whenever skips bumps the sequence
counter we correctly unpack the next patch. I also added another
resume= in the case a patch file is missing from the sequence to
avoid the same problem when a file in the sequence was removed.
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
old patch, believing that it is the new patch in the sequence.
If the old patch applied successfully it will commit it with the
supposedly skipped log message and ends up dropping the following patch.
If the patch did not apply the user is left with the conflict he tried
to skip and has to unpack the next patch in the sequence by hand to get
git-am back on track.
By clearing the resume variable whenever skips bumps the sequence
counter we correctly unpack the next patch. I also added another
resume= in the case a patch file is missing from the sequence to
avoid the same problem when a file in the sequence was removed.
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-am.sh | patch | blob | history |
diff --git a/git-am.sh b/git-am.sh
index 1a114bcc0809836ed4edaa0866704b899e587cd2..731ab1fffa4fbe563ab5e2c09cbbdca07e16cac4 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
if test "$skip" = t
then
this=`expr "$this" + 1`
+ resume=
fi
if test "$this" -gt "$last"
msgnum=`printf "%0${prec}d" $this`
next=`expr "$this" + 1`
test -f "$dotest/$msgnum" || {
+ resume=
go_next
continue
}