diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2014-06-16 00:01:25 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-16 13:29:16 -0700 |
commit | 95104c7e257652b82aed089494def344e3938928 (patch) | |
tree | ee8b3a07a8fe7a334a146110fe69ee2328558ce4 /git-rebase--merge.sh | |
parent | 34d5217584ee4722d0c0b07ed6c8f1f01ad157c3 (diff) | |
download | git-95104c7e257652b82aed089494def344e3938928.tar.gz git-95104c7e257652b82aed089494def344e3938928.tar.xz |
rebase--merge: fix --skip with two conflicts in a row
If git rebase --merge encountered a conflict, --skip would not work if the
next commit also conflicted. The msgnum file would never be updated with
the new patch number, so no patch would actually be skipped, resulting in an
inescapable loop.
Update the msgnum file's value as the first thing in call_merge. This also
avoids an "Already applied" message when skipping a commit. There is no
visible change for the other contexts in which call_merge is invoked, as the
msgnum file's value remains unchanged in those situations.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--merge.sh')
-rw-r--r-- | git-rebase--merge.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh index 838fbed6c..f6b5dd03d 100644 --- a/git-rebase--merge.sh +++ b/git-rebase--merge.sh @@ -53,11 +53,12 @@ continue_merge () { } call_merge () { - cmt="$(cat "$state_dir/cmt.$1")" + msgnum="$1" + echo "$msgnum" >"$state_dir/msgnum" + cmt="$(cat "$state_dir/cmt.$msgnum")" echo "$cmt" > "$state_dir/current" hd=$(git rev-parse --verify HEAD) cmt_name=$(git symbolic-ref HEAD 2> /dev/null || echo HEAD) - msgnum=$(cat "$state_dir/msgnum") eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end - $msgnum))"' eval GITHEAD_$hd='$onto_name' export GITHEAD_$cmt GITHEAD_$hd |