Merge branch 'bc/fix-rebase-merge-skip'
authorJunio C Hamano <gitster@pobox.com>
Wed, 2 Jul 2014 19:53:04 +0000 (12:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Jul 2014 19:53:04 +0000 (12:53 -0700)
"git rebase --skip" did not work well when it stopped due to a
conflict twice in a row.

* bc/fix-rebase-merge-skip:
rebase--merge: fix --skip with two conflicts in a row

1  2 
git-rebase--merge.sh
diff --combined git-rebase--merge.sh
index 6d77b3ca9118e6fdd36615757a24c109cf0530ee,f6b5dd03d76ab7a0aa804ba110bf73cce031c641..d3fb67d75bd3cdfebd048594cdb67eb179b1c435
@@@ -24,10 -24,10 +24,10 @@@ continue_merge () 
                die "$resolvemsg"
        fi
  
 -      cmt=`cat "$state_dir/current"`
 +      cmt=$(cat "$state_dir/current")
        if ! git diff-index --quiet --ignore-submodules HEAD --
        then
 -              if ! git commit --no-verify -C "$cmt"
 +              if ! git commit ${gpg_sign_opt:+"$gpg_sign_opt"} --no-verify -C "$cmt"
                then
                        echo "Commit failed, please do not call \"git commit\""
                        echo "directly, but instead do one of the following: "
  }
  
  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
@@@ -143,7 -144,7 +144,7 @@@ echo "$onto_name" > "$state_dir/onto_na
  write_basic_state
  
  msgnum=0
 -for cmt in `git rev-list --reverse --no-merges "$revisions"`
 +for cmt in $(git rev-list --reverse --no-merges "$revisions")
  do
        msgnum=$(($msgnum + 1))
        echo "$cmt" > "$state_dir/cmt.$msgnum"