Merge branch 'js/replace-edit-use-editor-configuration'
[gitweb.git] / t / t4014-format-patch.sh
index 646c4750ec6d3003379da34ee29f247d45cf5b57..eed2981b96df71c6acdc0f90f8b477561241a9a3 100755 (executable)
@@ -549,7 +549,7 @@ test_expect_success 'cover-letter inherits diff options' '
 
        git mv file foo &&
        git commit -m foo &&
-       git format-patch --cover-letter -1 &&
+       git format-patch --no-renames --cover-letter -1 &&
        check_patch 0000-cover-letter.patch &&
        ! grep "file => foo .* 0 *\$" 0000-cover-letter.patch &&
        git format-patch --cover-letter -1 -M &&
@@ -703,7 +703,7 @@ test_expect_success 'options no longer allowed for format-patch' '
 
 test_expect_success 'format-patch --numstat should produce a patch' '
        git format-patch --numstat --stdout master..side > output &&
-       test 6 = $(grep "^diff --git a/" output | wc -l)'
+       test 5 = $(grep "^diff --git a/" output | wc -l)'
 
 test_expect_success 'format-patch -- <path>' '
        git format-patch master..side -- file 2>error &&
@@ -1445,4 +1445,19 @@ test_expect_success 'From line has expected format' '
        test_cmp from filtered
 '
 
+test_expect_success 'format-patch format.outputDirectory option' '
+       test_config format.outputDirectory patches &&
+       rm -fr patches &&
+       git format-patch master..side &&
+       test $(git rev-list master..side | wc -l) -eq $(ls patches | wc -l)
+'
+
+test_expect_success 'format-patch -o overrides format.outputDirectory' '
+       test_config format.outputDirectory patches &&
+       rm -fr patches patchset &&
+       git format-patch master..side -o patchset &&
+       test_path_is_missing patches &&
+       test_path_is_dir patchset
+'
+
 test_done