Merge branch 'ak/t4151-ls-files-could-be-empty' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2016 20:17:17 +0000 (13:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2016 20:17:17 +0000 (13:17 -0700)
Test fix.

* ak/t4151-ls-files-could-be-empty:
t4151: make sure argument to 'test -z' is given

1  2 
t/t4151-am-abort.sh
diff --combined t/t4151-am-abort.sh
index ea5ace99a14f7f31b63dfd9cf25123725a525519,b878c21d5dd5a0110894b515ca57c56162ac34d4..9473c2779ef0df109f6943a949583676ea5ceabf
@@@ -82,7 -82,7 +82,7 @@@ test_expect_success 'am -3 --abort remo
        test 4 = "$(cat otherfile-4)" &&
        git am --abort &&
        test_cmp_rev initial HEAD &&
-       test -z $(git ls-files -u) &&
+       test -z "$(git ls-files -u)" &&
        test_path_is_missing otherfile-4
  '
  
@@@ -95,21 -95,6 +95,21 @@@ test_expect_success 'am --abort will ke
        test_cmp expect actual
  '
  
 +test_expect_success 'am --abort will keep dirty index intact' '
 +      git reset --hard initial &&
 +      echo dirtyfile >dirtyfile &&
 +      cp dirtyfile dirtyfile.expected &&
 +      git add dirtyfile &&
 +      test_must_fail git am 0001-*.patch &&
 +      test_cmp_rev initial HEAD &&
 +      test_path_is_file dirtyfile &&
 +      test_cmp dirtyfile.expected dirtyfile &&
 +      git am --abort &&
 +      test_cmp_rev initial HEAD &&
 +      test_path_is_file dirtyfile &&
 +      test_cmp dirtyfile.expected dirtyfile
 +'
 +
  test_expect_success 'am -3 stops on conflict on unborn branch' '
        git checkout -f --orphan orphan &&
        git reset &&
@@@ -168,28 -153,4 +168,28 @@@ test_expect_success 'am --abort on unbo
        test_cmp expect actual
  '
  
 +test_expect_success 'am --skip leaves index stat info alone' '
 +      git checkout -f --orphan skip-stat-info &&
 +      git reset &&
 +      test_commit skip-should-be-untouched &&
 +      test-chmtime =0 skip-should-be-untouched.t &&
 +      git update-index --refresh &&
 +      git diff-files --exit-code --quiet &&
 +      test_must_fail git am 0001-*.patch &&
 +      git am --skip &&
 +      git diff-files --exit-code --quiet
 +'
 +
 +test_expect_success 'am --abort leaves index stat info alone' '
 +      git checkout -f --orphan abort-stat-info &&
 +      git reset &&
 +      test_commit abort-should-be-untouched &&
 +      test-chmtime =0 abort-should-be-untouched.t &&
 +      git update-index --refresh &&
 +      git diff-files --exit-code --quiet &&
 +      test_must_fail git am 0001-*.patch &&
 +      git am --abort &&
 +      git diff-files --exit-code --quiet
 +'
 +
  test_done