Merge branch 'ky/branch-d-worktree' into maint
[gitweb.git] / t / t4014-format-patch.sh
index 646c4750ec6d3003379da34ee29f247d45cf5b57..3b99434e3e6f534efe44850fef3d1d77c04f5856 100755 (executable)
@@ -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