From: Junio C Hamano Date: Thu, 26 May 2016 20:17:17 +0000 (-0700) Subject: Merge branch 'ak/t4151-ls-files-could-be-empty' into maint X-Git-Tag: v2.9.0-rc1~12^2~12 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e8c7b8cf683bcaecfca21a9dd7c9464c50b4d1dd?ds=inline;hp=-c Merge branch 'ak/t4151-ls-files-could-be-empty' into maint Test fix. * ak/t4151-ls-files-could-be-empty: t4151: make sure argument to 'test -z' is given --- e8c7b8cf683bcaecfca21a9dd7c9464c50b4d1dd diff --combined t/t4151-am-abort.sh index ea5ace99a1,b878c21d5d..9473c2779e --- a/t/t4151-am-abort.sh +++ b/t/t4151-am-abort.sh @@@ -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