Merge branch 'cb/t3404-shellquote' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 11 Dec 2015 19:14:18 +0000 (11:14 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 11 Dec 2015 19:14:18 +0000 (11:14 -0800)
* cb/t3404-shellquote:
t3404: fix quoting of redirect for some versions of bash

1  2 
t/t3404-rebase-interactive.sh
index 98eb49ac236e9e9d08d5da5167f7e257db173c41,01701aa7a7f855639b422ad6d008ef041a37b3f9..9067e0206f12d472d6940842635759b4447010f1
@@@ -961,13 -961,13 +961,13 @@@ test_expect_success 'rebase -i produce
        set_fake_editor &&
        git rebase -i --onto I F branch-reflog-test &&
        cat >expect <<-\EOF &&
 -      rebase -i (start): checkout I
 -      rebase -i (pick): G
 -      rebase -i (pick): H
        rebase -i (finish): returning to refs/heads/branch-reflog-test
 +      rebase -i (pick): H
 +      rebase -i (pick): G
 +      rebase -i (start): checkout I
        EOF
 -      tail -n 4 .git/logs/HEAD |
 -      sed -e "s/.*    //" >actual &&
 +      git reflog -n4 HEAD |
 +      sed "s/[^:]*: //" >actual &&
        test_cmp expect actual
  '
  
@@@ -1102,27 -1102,6 +1102,27 @@@ test_expect_success 'rebase -i commits 
        test $(git cat-file commit HEAD | sed -ne \$p) = I
  '
  
 +test_expect_success 'rebase --continue removes CHERRY_PICK_HEAD' '
 +      git checkout -b commit-to-skip &&
 +      for double in X 3 1
 +      do
 +              test_seq 5 | sed "s/$double/&&/" >seq &&
 +              git add seq &&
 +              test_tick &&
 +              git commit -m seq-$double
 +      done &&
 +      git tag seq-onto &&
 +      git reset --hard HEAD~2 &&
 +      git cherry-pick seq-onto &&
 +      set_fake_editor &&
 +      test_must_fail env FAKE_LINES= git rebase -i seq-onto &&
 +      test -d .git/rebase-merge &&
 +      git rebase --continue &&
 +      git diff --exit-code seq-onto &&
 +      test ! -d .git/rebase-merge &&
 +      test ! -f .git/CHERRY_PICK_HEAD
 +'
 +
  rebase_setup_and_clean () {
        test_when_finished "
                git checkout master &&
@@@ -1234,7 -1213,7 +1234,7 @@@ test_expect_success 'tabs and spaces ar
                # Turn single spaces into space/tab mix
                sed "1s/ /      /g; 2s/ /  /g; 3s/ /    /g" "$1"
                printf "\n\t# comment\n #more\n\t # comment\n"
-       ) >$1.new
+       ) >"$1.new"
        mv "$1.new" "$1"
        EOF
        test_set_editor "$(pwd)/add-indent.sh" &&
@@@ -1261,16 -1240,4 +1261,16 @@@ test_expect_success 'static check of ba
        test E = $(git cat-file commit HEAD | sed -ne \$p)
  '
  
 +test_expect_success 'editor saves as CR/LF' '
 +      git checkout -b with-crlf &&
 +      write_script add-crs.sh <<-\EOF &&
 +      sed -e "s/\$/Q/" <"$1" | tr Q "\\015" >"$1".new &&
 +      mv -f "$1".new "$1"
 +      EOF
 +      (
 +              test_set_editor "$(pwd)/add-crs.sh" &&
 +              git rebase -i HEAD^
 +      )
 +'
 +
  test_done