Code

Merge branch 'jn/maint-fast-import-empty-ls' into maint
[git.git] / t / t4150-am.sh
index e1d381c43bedad287f4ff430c1b65756e1dc2c99..658354a6ce8ab13fd6b229bb2adecd8e29de9697 100755 (executable)
@@ -137,7 +137,7 @@ test_expect_success setup '
        git format-patch -M --stdout lorem^ >rename-add.patch &&
 
        # reset time
-       unset test_tick &&
+       sane_unset test_tick &&
        test_tick
 '
 
@@ -510,4 +510,14 @@ test_expect_success 'am -q is quiet' '
        ! test -s output.out
 '
 
+test_expect_success 'am empty-file does not infloop' '
+       rm -fr .git/rebase-apply &&
+       git reset --hard &&
+       touch empty-file &&
+       test_tick &&
+       { git am empty-file > actual 2>&1 && false || :; } &&
+       echo Patch format detection failed. >expected &&
+       test_cmp expected actual
+'
+
 test_done