]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'bw/format-patch-o-create-leading-dirs'
authorJunio C Hamano <gitster@pobox.com>
Thu, 24 Oct 2019 04:34:02 +0000 (13:34 +0900)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Oct 2019 04:34:02 +0000 (13:34 +0900)
Test update.

* bw/format-patch-o-create-leading-dirs:
  t4014: make output-directory tests self-contained

1  2 
t/t4014-format-patch.sh

diff --combined t/t4014-format-patch.sh
index 9facc3a79e9736a4fa25f27586349157cc00737b,93a1656f290d2420e64f3854d87ee78a5a416ac0..b8969998b5090984e608391167531cfc771f0ad3
@@@ -1615,17 -1615,20 +1615,20 @@@ test_expect_success 'format-patch -o wi
  '
  
  test_expect_success 'format-patch -o with leading existing directories' '
-       git format-patch -o patches/side master..side &&
+       rm -rf existing-dir &&
+       mkdir existing-dir &&
+       git format-patch -o existing-dir/patches master..side &&
        count=$(git rev-list --count master..side) &&
-       ls patches/side >list &&
+       ls existing-dir/patches >list &&
        test_line_count = $count list
  '
  
  test_expect_success 'format-patch -o with leading non-existing directories' '
-       rm -fr patches &&
-       git format-patch -o patches/side master..side &&
+       rm -rf non-existing-dir &&
+       git format-patch -o non-existing-dir/patches master..side &&
        count=$(git rev-list --count master..side) &&
-       ls patches/side >list &&
+       test_path_is_dir non-existing-dir &&
+       ls non-existing-dir/patches >list &&
        test_line_count = $count list
  '
  
@@@ -1633,9 -1636,8 +1636,9 @@@ test_expect_success 'format-patch forma
        test_config format.outputDirectory patches &&
        rm -fr patches &&
        git format-patch master..side &&
 -      git rev-list master..side >list &&
 -      test_line_count = $(ls patches | wc -l) list
 +      count=$(git rev-list --count master..side) &&
 +      ls patches >list &&
 +      test_line_count = $count list
  '
  
  test_expect_success 'format-patch -o overrides format.outputDirectory' '