Git development
 help / color / mirror / Atom feed
* [PATCH 0/3] Update t40* tests to use modern style.
@ 2026-09-08 19:44 Mark C. Chu-Carroll via B4 Relay
  2026-09-08 19:44 ` [PATCH 1/3] Update t4001 to use modern syntax Mark C. Chu-Carroll via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Mark C. Chu-Carroll via B4 Relay @ 2026-09-08 19:44 UTC (permalink / raw)
  To: git; +Cc: Mark C. Chu-Carroll

Signed-off-by: Mark C. Chu-Carroll <markchucarroll@fastmail.com>
---
Mark C. Chu-Carroll (3):
      Update t4001 to use modern syntax.
      Update t4009 to use modern style.
      Update t4010 to use modern style.

 t/t4001-diff-rename.sh   | 31 +++++++++----------
 t/t4009-diff-rename-4.sh | 54 ++++++++++++++++-----------------
 t/t4010-diff-pathspec.sh | 78 ++++++++++++++++++++++++------------------------
 3 files changed, 82 insertions(+), 81 deletions(-)


---
base-commit: b8242b093d9e941a34460d715e3ce616a34ac3fe
change-id: 20260908-modernize-t4001-fb43302caaf9



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] Update t4001 to use modern syntax.
  2026-09-08 19:44 [PATCH 0/3] Update t40* tests to use modern style Mark C. Chu-Carroll via B4 Relay
@ 2026-09-08 19:44 ` Mark C. Chu-Carroll via B4 Relay
  2026-09-08 20:48   ` Junio C Hamano
  2026-09-08 19:44 ` [PATCH 2/3] Update t4009 to use modern style Mark C. Chu-Carroll via B4 Relay
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Mark C. Chu-Carroll via B4 Relay @ 2026-09-08 19:44 UTC (permalink / raw)
  To: git; +Cc: Mark C. Chu-Carroll

From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>

---
 t/t4001-diff-rename.sh   | 31 ++++++++++++++++---------------
 t/t4009-diff-rename-4.sh |  8 ++++----
 2 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh
index ad474100af..2aa161c217 100755
--- a/t/t4001-diff-rename.sh
+++ b/t/t4001-diff-rename.sh
@@ -88,28 +88,29 @@ test_expect_success 'setup' '
 	EOF
 '
 
-test_expect_success \
-    'update-index --add a file.' \
-    'git update-index --add path0'
+test_expect_success 'update-index --add a file.' '
+    git update-index --add path0
+'
 
-test_expect_success \
-    'write that tree.' \
-    'tree=$(git write-tree) && echo $tree'
+test_expect_success 'write that tree.' '
+    tree=$(git write-tree) && echo $tree
+'
 
 sed -e 's/line/Line/' <path0 >path1
 rm -f path0
-test_expect_success \
-    'renamed and edited the file.' \
-    'git update-index --add --remove path0 path1'
 
-test_expect_success \
-    'git diff-index -p -M after rename and editing.' \
-    'git diff-index -p -M $tree >current'
+test_expect_success 'renamed and edited the file.' '
+    git update-index --add --remove path0 path1
+'
+
+test_expect_success 'git diff-index -p -M after rename and editing.' '
+    git diff-index -p -M $tree >current
+'
 
 
-test_expect_success \
-    'validate the output.' \
-    'compare_diff_patch current expected'
+test_expect_success 'validate the output.' '
+    compare_diff_patch current expected
+'
 
 test_expect_success 'test diff.renames=true' '
 	git -c diff.renames=true diff --cached $tree >current &&
diff --git a/t/t4009-diff-rename-4.sh b/t/t4009-diff-rename-4.sh
index 59e71e3acd..8f86dc7274 100755
--- a/t/t4009-diff-rename-4.sh
+++ b/t/t4009-diff-rename-4.sh
@@ -19,10 +19,10 @@ test_expect_success \
     tree=$(git write-tree) &&
     echo $tree'
 
-test_expect_success \
-    'prepare work tree' \
-    'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
-    sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
+
+test_expect_success 'prepare work tree' '
+    sed -e "s/HOWEVER/However/" <COPYING >COPYING.1 &&
+    sed -e "s/GPL/G.P.L/g" <COPYING >COPYING.2 &&
     rm -f COPYING &&
     c1=$(git hash-object COPYING.1) &&
     c2=$(git hash-object COPYING.2) &&

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] Update t4009 to use modern style.
  2026-09-08 19:44 [PATCH 0/3] Update t40* tests to use modern style Mark C. Chu-Carroll via B4 Relay
  2026-09-08 19:44 ` [PATCH 1/3] Update t4001 to use modern syntax Mark C. Chu-Carroll via B4 Relay
@ 2026-09-08 19:44 ` Mark C. Chu-Carroll via B4 Relay
  2026-09-08 19:44 ` [PATCH 3/3] Update t4010 " Mark C. Chu-Carroll via B4 Relay
  2026-09-10 17:07 ` [PATCH v2 0/3] Update t40* tests " Mark C. Chu-Carroll via B4 Relay
  3 siblings, 0 replies; 10+ messages in thread
From: Mark C. Chu-Carroll via B4 Relay @ 2026-09-08 19:44 UTC (permalink / raw)
  To: git; +Cc: Mark C. Chu-Carroll

From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>

---
 t/t4009-diff-rename-4.sh | 48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/t/t4009-diff-rename-4.sh b/t/t4009-diff-rename-4.sh
index 8f86dc7274..198de5d039 100755
--- a/t/t4009-diff-rename-4.sh
+++ b/t/t4009-diff-rename-4.sh
@@ -10,15 +10,14 @@ test_description='Same rename detection as t4003 but testing diff-raw -z.
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
-test_expect_success \
-    'prepare reference tree' \
-    'COPYING_test_data >COPYING &&
-     echo frotz >rezrov &&
+test_expect_success  'prepare reference tree' '
+    COPYING_test_data >COPYING &&
+    echo frotz >rezrov &&
     git update-index --add COPYING rezrov &&
     orig=$(git hash-object COPYING) &&
     tree=$(git write-tree) &&
-    echo $tree'
-
+    echo $tree
+'
 
 test_expect_success 'prepare work tree' '
     sed -e "s/HOWEVER/However/" <COPYING >COPYING.1 &&
@@ -26,7 +25,8 @@ test_expect_success 'prepare work tree' '
     rm -f COPYING &&
     c1=$(git hash-object COPYING.1) &&
     c2=$(git hash-object COPYING.2) &&
-    git update-index --add --remove COPYING COPYING.?'
+    git update-index --add --remove COPYING COPYING.?
+'
 
 # tree has COPYING and rezrov.  work tree has COPYING.1 and COPYING.2,
 # both are slightly edited, and unchanged rezrov.  We say COPYING.1
@@ -44,16 +44,16 @@ COPYING
 COPYING.2
 EOF
 
-test_expect_success \
-    'validate output from rename/copy detection (#1)' \
-    'compare_diff_raw_z current expected'
+test_expect_success 'validate output from rename/copy detection (#1)' '
+    compare_diff_raw_z current expected
+'
 
 ################################################################
 
-test_expect_success \
-    'prepare work tree again' \
-    'mv COPYING.2 COPYING &&
-     git update-index --add --remove COPYING COPYING.1 COPYING.2'
+test_expect_success 'prepare work tree again' '
+    mv COPYING.2 COPYING &&
+    git update-index --add --remove COPYING COPYING.1 COPYING.2
+'
 
 # tree has COPYING and rezrov.  work tree has COPYING and COPYING.1,
 # both are slightly edited, and unchanged rezrov.  We say COPYING.1
@@ -69,9 +69,9 @@ COPYING
 COPYING.1
 EOF
 
-test_expect_success \
-    'validate output from rename/copy detection (#2)' \
-    'compare_diff_raw_z current expected'
+test_expect_success 'validate output from rename/copy detection (#2)' '
+    compare_diff_raw_z current expected
+'
 
 ################################################################
 
@@ -80,10 +80,10 @@ test_expect_success \
 # anything about rezrov or COPYING, since the revised again diff-raw
 # nows how to say Copy.
 
-test_expect_success \
-    'prepare work tree once again' \
-    'COPYING_test_data >COPYING &&
-     git update-index --add --remove COPYING COPYING.1'
+test_expect_success 'prepare work tree once again' '
+    COPYING_test_data >COPYING &&
+    git update-index --add --remove COPYING COPYING.1
+'
 
 git diff-index -z -C --find-copies-harder $tree >current
 cat >expected <<EOF
@@ -92,8 +92,8 @@ COPYING
 COPYING.1
 EOF
 
-test_expect_success \
-    'validate output from rename/copy detection (#3)' \
-    'compare_diff_raw_z current expected'
+test_expect_success 'validate output from rename/copy detection (#3)' '
+    compare_diff_raw_z current expected
+'
 
 test_done

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] Update t4010 to use modern style.
  2026-09-08 19:44 [PATCH 0/3] Update t40* tests to use modern style Mark C. Chu-Carroll via B4 Relay
  2026-09-08 19:44 ` [PATCH 1/3] Update t4001 to use modern syntax Mark C. Chu-Carroll via B4 Relay
  2026-09-08 19:44 ` [PATCH 2/3] Update t4009 to use modern style Mark C. Chu-Carroll via B4 Relay
@ 2026-09-08 19:44 ` Mark C. Chu-Carroll via B4 Relay
  2026-09-10 17:07 ` [PATCH v2 0/3] Update t40* tests " Mark C. Chu-Carroll via B4 Relay
  3 siblings, 0 replies; 10+ messages in thread
From: Mark C. Chu-Carroll via B4 Relay @ 2026-09-08 19:44 UTC (permalink / raw)
  To: git; +Cc: Mark C. Chu-Carroll

From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>

---
 t/t4010-diff-pathspec.sh | 78 ++++++++++++++++++++++++------------------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/t/t4010-diff-pathspec.sh b/t/t4010-diff-pathspec.sh
index c84c3fa05b..59e4501203 100755
--- a/t/t4010-diff-pathspec.sh
+++ b/t/t4010-diff-pathspec.sh
@@ -13,67 +13,67 @@ Prepare:
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
-test_expect_success \
-    setup \
-    'echo frotz >file0 &&
-     mkdir path1 &&
-     echo rezrov >path1/file1 &&
-     before0=$(git hash-object file0) &&
-     before1=$(git hash-object path1/file1) &&
-     git update-index --add file0 path1/file1 &&
-     tree=$(git write-tree) &&
-     echo "$tree" &&
-     echo nitfol >file0 &&
-     echo yomin >path1/file1 &&
-     after0=$(git hash-object file0) &&
-     after1=$(git hash-object path1/file1) &&
-     git update-index file0 path1/file1'
+test_expect_success setup '
+    echo frotz >file0 &&
+    mkdir path1 &&
+    echo rezrov >path1/file1 &&
+    before0=$(git hash-object file0) &&
+    before1=$(git hash-object path1/file1) &&
+    git update-index --add file0 path1/file1 &&
+    tree=$(git write-tree) &&
+    echo "$tree" &&
+    echo nitfol >file0 &&
+    echo yomin >path1/file1 &&
+    after0=$(git hash-object file0) &&
+    after1=$(git hash-object path1/file1) &&
+    git update-index file0 path1/file1
+'
 
 cat >expected <<\EOF
 EOF
-test_expect_success \
-    'limit to path should show nothing' \
-    'git diff-index --cached $tree -- path >current &&
-     compare_diff_raw current expected'
+test_expect_success 'limit to path should show nothing' '
+    git diff-index --cached $tree -- path >current &&
+    compare_diff_raw current expected
+'
 
 cat >expected <<EOF
 :100644 100644 $before1 $after1 M	path1/file1
 EOF
-test_expect_success \
-    'limit to path1 should show path1/file1' \
-    'git diff-index --cached $tree -- path1 >current &&
-     compare_diff_raw current expected'
+test_expect_success 'limit to path1 should show path1/file1' '
+    git diff-index --cached $tree -- path1 >current &&
+    compare_diff_raw current expected
+'
 
 cat >expected <<EOF
 :100644 100644 $before1 $after1 M	path1/file1
 EOF
-test_expect_success \
-    'limit to path1/ should show path1/file1' \
-    'git diff-index --cached $tree -- path1/ >current &&
-     compare_diff_raw current expected'
+test_expect_success 'limit to path1/ should show path1/file1' '
+    git diff-index --cached $tree -- path1/ >current &&
+    compare_diff_raw current expected
+'
 
 cat >expected <<EOF
 :100644 100644 $before1 $after1 M	path1/file1
 EOF
-test_expect_success \
-    '"*file1" should show path1/file1' \
-    'git diff-index --cached $tree -- "*file1" >current &&
-     compare_diff_raw current expected'
+test_expect_success '"*file1" should show path1/file1' '
+    git diff-index --cached $tree -- "*file1" >current &&
+    compare_diff_raw current expected
+'
 
 cat >expected <<EOF
 :100644 100644 $before0 $after0 M	file0
 EOF
-test_expect_success \
-    'limit to file0 should show file0' \
-    'git diff-index --cached $tree -- file0 >current &&
-     compare_diff_raw current expected'
+test_expect_success 'limit to file0 should show file0' '
+    git diff-index --cached $tree -- file0 >current &&
+    compare_diff_raw current expected
+'
 
 cat >expected <<\EOF
 EOF
-test_expect_success \
-    'limit to file0/ should emit nothing.' \
-    'git diff-index --cached $tree -- file0/ >current &&
-     compare_diff_raw current expected'
+test_expect_success 'limit to file0/ should emit nothing.' '
+    git diff-index --cached $tree -- file0/ >current &&
+    compare_diff_raw current expected
+'
 
 test_expect_success 'diff-tree pathspec' '
 	tree2=$(git write-tree) &&

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] Update t4001 to use modern syntax.
  2026-09-08 19:44 ` [PATCH 1/3] Update t4001 to use modern syntax Mark C. Chu-Carroll via B4 Relay
@ 2026-09-08 20:48   ` Junio C Hamano
  0 siblings, 0 replies; 10+ messages in thread
From: Junio C Hamano @ 2026-09-08 20:48 UTC (permalink / raw)
  To: Mark C. Chu-Carroll via B4 Relay; +Cc: git, Mark C. Chu-Carroll

"Mark C. Chu-Carroll via B4 Relay"
<devnull+markchucarroll.fastmail.com@kernel.org> writes:

> Subject: Re: [PATCH 1/3] Update t4001 to use modern syntax.

Documentation/SubmittingPatches::[[describe-changes]]
Documentation/SubmittingPatches::[[summary-section]]

> From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>
>
> ---

Documentation/SubmittingPatches::[[sign-off]]

>  t/t4001-diff-rename.sh   | 31 ++++++++++++++++---------------
>  t/t4009-diff-rename-4.sh |  8 ++++----
>  2 files changed, 20 insertions(+), 19 deletions(-)
>
> diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh
> index ad474100af..2aa161c217 100755
> --- a/t/t4001-diff-rename.sh
> +++ b/t/t4001-diff-rename.sh
> @@ -88,28 +88,29 @@ test_expect_success 'setup' '
>  	EOF
>  '

There are a bit more in the differences between this ancient style
and the modern style.  Not just the title appearing on the first line
and the body is opened with a single quote at the end of the first
line, the body is indented with a single tab.

>  
> -test_expect_success \
> -    'update-index --add a file.' \
> -    'git update-index --add path0'
> +test_expect_success 'update-index --add a file.' '
> +    git update-index --add path0
> +'

Also in "modern style", the tests are split at more logical
boundaries.  As the topic of this test is "diff rename", our purpose
of this test script is not to catch a crashing "update-index --add".
We are not interested in finding "update-index --add" to fail and
see "not ok" for such a failure.  This step is merely the first step
of building the tree object to be compared later with a modified
index.

> -test_expect_success \
> -    'write that tree.' \
> -    'tree=$(git write-tree) && echo $tree'
> +test_expect_success 'write that tree.' '
> +    tree=$(git write-tree) && echo $tree
> +'

Likewise, we are not interested to find out what object name the
resulting tree object gets.  "echo" here were placed long ago merely
for debugging purposes.

>  sed -e 's/line/Line/' <path0 >path1
>  rm -f path0

And in "modern style" tests, we strongly frown upon tests doing
anything outside test_expect_success blocks.  This is a preparation
to pretend that path0 was "renamed" to path1, and it is concluded ...

> -test_expect_success \
> -    'renamed and edited the file.' \
> -    'git update-index --add --remove path0 path1'
>  
> -test_expect_success \
> -    'git diff-index -p -M after rename and editing.' \
> -    'git diff-index -p -M $tree >current'
> +test_expect_success 'renamed and edited the file.' '
> +    git update-index --add --remove path0 path1
> +'

... with this step.

> +test_expect_success 'git diff-index -p -M after rename and editing.' '
> +    git diff-index -p -M $tree >current
> +'

And the output is obtained.  Again, it is not like we are happy that
this "diff-index" does not crash, so in "modern style", we do not
split a logically test like this at this point.  We want to see the
command produce, without segfaulting, its output to the file "current",
and we also want to see that the result matches what we expect.

> -test_expect_success \
> -    'validate the output.' \
> -    'compare_diff_patch current expected'
> +test_expect_success 'validate the output.' '
> +    compare_diff_patch current expected
> +'

In addition, in "modern" style, it is more common to name the file
that the actual output goes "actual", and the file that has the
expected contents "expect", and compare "expect" with "actual".
This test has compared contents in two files with wrong names, and
compares them in a wrong order.

Taking all together, it would look more like this, I would imagine.
Of course as "expected" has been renamed to "expect" in the initial
set-up part, the fallouts in the remainder of the test script also
needs to be dealt with, which is left as an exercise to the reader.

 t/t4001-diff-rename.sh | 31 +++++++++++--------------------
 1 file changed, 11 insertions(+), 20 deletions(-)

diff --git c/t/t4001-diff-rename.sh w/t/t4001-diff-rename.sh
index ad474100af..61d651d1db 100755
--- c/t/t4001-diff-rename.sh
+++ w/t/t4001-diff-rename.sh
@@ -26,7 +26,7 @@ test_expect_success 'setup' '
 	Line 14
 	Line 15
 	EOF
-	cat >expected <<-\EOF &&
+	cat >expect <<-\EOF &&
 	diff --git a/path0 b/path1
 	rename from path0
 	rename to path1
@@ -88,28 +88,19 @@ test_expect_success 'setup' '
 	EOF
 '
 
-test_expect_success \
-    'update-index --add a file.' \
-    'git update-index --add path0'
-
-test_expect_success \
-    'write that tree.' \
-    'tree=$(git write-tree) && echo $tree'
+test_expect_success 'path0 renamed to path1 with minor edit' '
+	git update-index --add path0 &&
+	tree=$(git write-tree) &&
 
-sed -e 's/line/Line/' <path0 >path1
-rm -f path0
-test_expect_success \
-    'renamed and edited the file.' \
-    'git update-index --add --remove path0 path1'
+	# edit and rename
+	sed -e 's/line/Line/' <path0 >path1 &&
+	rm -f path0 &&
+	git update-index --add --remove path0 path1 &&
 
-test_expect_success \
-    'git diff-index -p -M after rename and editing.' \
-    'git diff-index -p -M $tree >current'
+	git diff-index -p -M $tree >actual &&
 
-
-test_expect_success \
-    'validate the output.' \
-    'compare_diff_patch current expected'
+	compare_diff_patch expect actual
+'
 
 test_expect_success 'test diff.renames=true' '
 	git -c diff.renames=true diff --cached $tree >current &&

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 0/3] Update t40* tests to use modern style.
  2026-09-08 19:44 [PATCH 0/3] Update t40* tests to use modern style Mark C. Chu-Carroll via B4 Relay
                   ` (2 preceding siblings ...)
  2026-09-08 19:44 ` [PATCH 3/3] Update t4010 " Mark C. Chu-Carroll via B4 Relay
@ 2026-09-10 17:07 ` Mark C. Chu-Carroll via B4 Relay
  2026-09-10 17:07   ` [PATCH v2 1/3] Update t4001 to use modern syntax Mark C. Chu-Carroll via B4 Relay
                     ` (2 more replies)
  3 siblings, 3 replies; 10+ messages in thread
From: Mark C. Chu-Carroll via B4 Relay @ 2026-09-10 17:07 UTC (permalink / raw)
  To: git; +Cc: Mark C. Chu-Carroll

To: git@vger.kernel.org
Signed-off-by: Mark C. Chu-Carroll <markchucarroll@fastmail.com>

Changes in v2:
- Merged setups into main test bodies.
- Removed unnecessary echos.
- Cleaned up here-docs.
- Updated names to modern style.

- Link to v1: https://patch.msgid.link/20260908-modernize-t4001-v1-0-cab3933a173f@fastmail.com

---
Mark C. Chu-Carroll (3):
      Update t4001 to use modern syntax.
      Update t4009 to use modern style.
      Update t4010 to use modern style.

 t/t4001-diff-rename.sh   |  97 ++++++++++++++++-------------------
 t/t4009-diff-rename-4.sh | 131 +++++++++++++++++++++++------------------------
 t/t4010-diff-pathspec.sh |  88 +++++++++++--------------------
 3 files changed, 137 insertions(+), 179 deletions(-)

Range-diff versus v1:

1:  d55c790b60 < -:  ---------- Update t4001 to use modern syntax.
2:  0fec9484a6 < -:  ---------- Update t4009 to use modern style.
3:  4dbb726578 < -:  ---------- Update t4010 to use modern style.
-:  ---------- > 1:  d560c2a155 Update t4001 to use modern syntax.
-:  ---------- > 2:  a52bf71409 Update t4009 to use modern style.
-:  ---------- > 3:  553fe00594 Update t4010 to use modern style.

---
base-commit: 5c40f33ab5825c90dd32cfb08198de2beedc6ed1
change-id: 20260908-modernize-t4001-fb43302caaf9



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/3] Update t4001 to use modern syntax.
  2026-09-10 17:07 ` [PATCH v2 0/3] Update t40* tests " Mark C. Chu-Carroll via B4 Relay
@ 2026-09-10 17:07   ` Mark C. Chu-Carroll via B4 Relay
  2026-09-10 17:56     ` Junio C Hamano
  2026-09-10 17:07   ` [PATCH v2 2/3] Update t4009 to use modern style Mark C. Chu-Carroll via B4 Relay
  2026-09-10 17:07   ` [PATCH v2 3/3] Update t4010 " Mark C. Chu-Carroll via B4 Relay
  2 siblings, 1 reply; 10+ messages in thread
From: Mark C. Chu-Carroll via B4 Relay @ 2026-09-10 17:07 UTC (permalink / raw)
  To: git; +Cc: Mark C. Chu-Carroll

From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>

---
 t/t4001-diff-rename.sh   | 97 +++++++++++++++++++++---------------------------
 t/t4009-diff-rename-4.sh | 54 +++++++++++++--------------
 2 files changed, 70 insertions(+), 81 deletions(-)

diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh
index ad474100af..c27bd9d781 100755
--- a/t/t4001-diff-rename.sh
+++ b/t/t4001-diff-rename.sh
@@ -8,7 +8,7 @@ test_description='Test rename detection in diff engine.'
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
-test_expect_success 'setup' '
+initial_setup () {
 	cat >path0 <<-\EOF &&
 	Line 1
 	Line 2
@@ -26,7 +26,7 @@ test_expect_success 'setup' '
 	Line 14
 	Line 15
 	EOF
-	cat >expected <<-\EOF &&
+	cat >expect <<-\EOF &&
 	diff --git a/path0 b/path1
 	rename from path0
 	rename to path1
@@ -42,7 +42,7 @@ test_expect_success 'setup' '
 	 Line 13
 	 Line 14
 	EOF
-	cat >no-rename <<-\EOF
+	cat >expect-no-rename <<-\EOF
 	diff --git a/path0 b/path0
 	deleted file mode 100644
 	index fdbec44..0000000
@@ -86,47 +86,36 @@ test_expect_success 'setup' '
 	+Line 14
 	+Line 15
 	EOF
-'
-
-test_expect_success \
-    'update-index --add a file.' \
-    'git update-index --add path0'
-
-test_expect_success \
-    'write that tree.' \
-    'tree=$(git write-tree) && echo $tree'
-
-sed -e 's/line/Line/' <path0 >path1
-rm -f path0
-test_expect_success \
-    'renamed and edited the file.' \
-    'git update-index --add --remove path0 path1'
+    update-index --add a file.
+    git update-index --add path0
+}
 
-test_expect_success \
-    'git diff-index -p -M after rename and editing.' \
-    'git diff-index -p -M $tree >current'
-
-
-test_expect_success \
-    'validate the output.' \
-    'compare_diff_patch current expected'
+test_expect_success 'Diff shows path0 renamed to path1 with edit.' '
+	initial_setup &&
+	tree=$(git write-tree) &&
+	sed -e "s/line/Line/" <path0 >path1 &&
+	rm -f path0 &&
+	git update-index --add --remove path0 path1 &&
+	git diff-index -p -M $tree >actual &&
+	compare_diff_patch actual expect
+'
 
-test_expect_success 'test diff.renames=true' '
-	git -c diff.renames=true diff --cached $tree >current &&
-	compare_diff_patch current expected
+test_expect_success 'With diff.renames=true, patch includes rename of path0 to path1' '
+	git -c diff.renames=true diff --cached $tree >actual &&
+	compare_diff_patch actual expect
 '
 
-test_expect_success 'test diff.renames=false' '
-	git -c diff.renames=false diff --cached $tree >current &&
-	compare_diff_patch current no-rename
+test_expect_success 'With diff.renames=false, patch does not include rename' '
+	git -c diff.renames=false diff --cached $tree >actual &&
+	compare_diff_patch actual expect-no-rename
 '
 
-test_expect_success 'test diff.renames unset' '
-	git diff --cached $tree >current &&
-	compare_diff_patch current expected
+test_expect_success 'With no setting for diff.renames, patch includes rename' '
+	git diff --cached $tree >actual &&
+	compare_diff_patch actual expect
 '
 
-test_expect_success 'favour same basenames over different ones' '
+test_expect_success 'Diff rename favours same basenames over different ones' '
 	cp path1 another-path &&
 	git add another-path &&
 	git commit -m 1 &&
@@ -137,25 +126,25 @@ test_expect_success 'favour same basenames over different ones' '
 	test_grep "renamed: .*path1 -> subdir/path1" out
 '
 
-test_expect_success 'test diff.renames=true for git status' '
+test_expect_success 'With diff.renames=true, git status includes rename' '
 	git -c diff.renames=true status >out &&
 	test_grep "renamed: .*path1 -> subdir/path1" out
 '
 
-test_expect_success 'test diff.renames=false for git status' '
+test_expect_success 'With diff.renames=false, git status shows delete/add' '
 	git -c diff.renames=false status >out &&
 	test_grep ! "renamed: .*path1 -> subdir/path1" out &&
 	test_grep "new file: .*subdir/path1" out &&
 	test_grep "deleted: .*[^/]path1" out
 '
 
-test_expect_success 'favour same basenames even with minor differences' '
+test_expect_success 'rename logic favours same basenames even with minor differences' '
 	git show HEAD:path1 | sed "s/15/16/" > subdir/path1 &&
 	git status >out &&
 	test_grep "renamed: .*path1 -> subdir/path1" out
 '
 
-test_expect_success 'two files with same basename and same content' '
+test_expect_success 'Favors common path segments for files with the same basename and content' '
 	git reset --hard &&
 	mkdir -p dir/A dir/B &&
 	cp path1 dir/A/file &&
@@ -167,7 +156,7 @@ test_expect_success 'two files with same basename and same content' '
 	test_grep "renamed: .*dir/A/file -> other-dir/A/file" out
 '
 
-test_expect_success 'setup for many rename source candidates' '
+test_expect_success 'rename with many candidates' '
 	git reset --hard &&
 	for i in 0 1 2 3 4 5 6 7 8 9;
 	do
@@ -177,14 +166,14 @@ test_expect_success 'setup for many rename source candidates' '
 		done
 	done &&
 	git add "path??" &&
-	test_tick &&
+	test_tick  &&
 	git commit -m "hundred" &&
 	(cat path1 && echo new) >new-path &&
 	echo old >>path1 &&
 	git add new-path path1 &&
 	git diff -l 4 -C -C --cached --name-status >actual 2>actual.err &&
 	sed -e "s/^\([CM]\)[0-9]*	/\1	/" actual >actual.munged &&
-	cat >expect <<-EOF &&
+	cat >expect <<-\EOF &&
 	C	path1	new-path
 	M	path1
 	EOF
@@ -192,7 +181,7 @@ test_expect_success 'setup for many rename source candidates' '
 	test_grep warning actual.err
 '
 
-test_expect_success 'rename pretty print with nothing in common' '
+test_expect_success 'rename pretty prints paths with nothing in common' '
 	mkdir -p a/b/ &&
 	: >a/b/c &&
 	git add a/b/c &&
@@ -206,7 +195,7 @@ test_expect_success 'rename pretty print with nothing in common' '
 	test_grep " a/b/c => c/b/a " output
 '
 
-test_expect_success 'rename pretty print with common prefix' '
+test_expect_success 'rename pretty prints paths with common prefix' '
 	mkdir -p c/d &&
 	git mv c/b/a c/d/e &&
 	git commit -m "c/b/a -> c/d/e" &&
@@ -216,7 +205,7 @@ test_expect_success 'rename pretty print with common prefix' '
 	test_grep " c/{b/a => d/e} " output
 '
 
-test_expect_success 'rename pretty print with common suffix' '
+test_expect_success 'rename pretty prints paths with common suffix' '
 	mkdir d &&
 	git mv c/d/e d/e &&
 	git commit -m "c/d/e -> d/e" &&
@@ -226,7 +215,7 @@ test_expect_success 'rename pretty print with common suffix' '
 	test_grep " {c/d => d}/e " output
 '
 
-test_expect_success 'rename pretty print with common prefix and suffix' '
+test_expect_success 'rename pretty prints paths with common prefix and suffix' '
 	mkdir d/f &&
 	git mv d/e d/f/e &&
 	git commit -m "d/e -> d/f/e" &&
@@ -236,7 +225,7 @@ test_expect_success 'rename pretty print with common prefix and suffix' '
 	test_grep " d/{ => f}/e " output
 '
 
-test_expect_success 'rename pretty print common prefix and suffix overlap' '
+test_expect_success 'rename pretty prints paths with common prefix and suffix overlap' '
 	mkdir d/f/f &&
 	git mv d/f/e d/f/f/e &&
 	git commit -m "d/f/e d/f/f/e" &&
@@ -261,7 +250,7 @@ test_expect_success 'diff-tree -l0 defaults to a big rename limit, not zero' '
 	test_grep "myotherfile.*myfile" actual
 '
 
-test_expect_success 'basename similarity vs best similarity' '
+test_expect_success 'rename prefers basename similarity over best similarity' '
 	mkdir subdir &&
 	test_write_lines line1 line2 line3 line4 line5 \
 			 line6 line7 line8 line9 line10 >subdir/file.txt &&
@@ -278,14 +267,14 @@ test_expect_success 'basename similarity vs best similarity' '
 	git diff-tree -r -M --name-status HEAD^ HEAD >actual &&
 	# subdir/file.txt is 88% similar to file.md, 78% similar to file.txt,
 	# but since same basenames are checked first...
-	cat >expected <<-\EOF &&
+	cat >expect <<-\EOF &&
 	A	file.md
 	R078	subdir/file.txt	file.txt
 	EOF
-	test_cmp expected actual
+	test_cmp expect actual
 '
 
-test_expect_success 'last line matters too' '
+test_expect_success 'file similarity handles missing trailing newline.' '
 	{
 		test_write_lines a 0 1 2 3 4 5 6 7 8 9 &&
 		printf "git ignores final up to 63 characters if not newline terminated"
@@ -303,10 +292,10 @@ test_expect_success 'last line matters too' '
 	git commit -a -m "rename no-final-lf -> still-absent-final-lf" &&
 	git diff-tree -r -M --name-status HEAD^ HEAD >actual &&
 	sed -e "s/^R[0-9]*	/R	/" actual >actual.munged &&
-	cat >expected <<-\EOF &&
+	cat >expect <<-\EOF &&
 	R	no-final-lf	still-absent-final-lf
 	EOF
-	test_cmp expected actual.munged
+	test_cmp expect actual.munged
 '
 
 test_done
diff --git a/t/t4009-diff-rename-4.sh b/t/t4009-diff-rename-4.sh
index 59e71e3acd..198de5d039 100755
--- a/t/t4009-diff-rename-4.sh
+++ b/t/t4009-diff-rename-4.sh
@@ -10,23 +10,23 @@ test_description='Same rename detection as t4003 but testing diff-raw -z.
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
-test_expect_success \
-    'prepare reference tree' \
-    'COPYING_test_data >COPYING &&
-     echo frotz >rezrov &&
+test_expect_success  'prepare reference tree' '
+    COPYING_test_data >COPYING &&
+    echo frotz >rezrov &&
     git update-index --add COPYING rezrov &&
     orig=$(git hash-object COPYING) &&
     tree=$(git write-tree) &&
-    echo $tree'
+    echo $tree
+'
 
-test_expect_success \
-    'prepare work tree' \
-    'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
-    sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
+test_expect_success 'prepare work tree' '
+    sed -e "s/HOWEVER/However/" <COPYING >COPYING.1 &&
+    sed -e "s/GPL/G.P.L/g" <COPYING >COPYING.2 &&
     rm -f COPYING &&
     c1=$(git hash-object COPYING.1) &&
     c2=$(git hash-object COPYING.2) &&
-    git update-index --add --remove COPYING COPYING.?'
+    git update-index --add --remove COPYING COPYING.?
+'
 
 # tree has COPYING and rezrov.  work tree has COPYING.1 and COPYING.2,
 # both are slightly edited, and unchanged rezrov.  We say COPYING.1
@@ -44,16 +44,16 @@ COPYING
 COPYING.2
 EOF
 
-test_expect_success \
-    'validate output from rename/copy detection (#1)' \
-    'compare_diff_raw_z current expected'
+test_expect_success 'validate output from rename/copy detection (#1)' '
+    compare_diff_raw_z current expected
+'
 
 ################################################################
 
-test_expect_success \
-    'prepare work tree again' \
-    'mv COPYING.2 COPYING &&
-     git update-index --add --remove COPYING COPYING.1 COPYING.2'
+test_expect_success 'prepare work tree again' '
+    mv COPYING.2 COPYING &&
+    git update-index --add --remove COPYING COPYING.1 COPYING.2
+'
 
 # tree has COPYING and rezrov.  work tree has COPYING and COPYING.1,
 # both are slightly edited, and unchanged rezrov.  We say COPYING.1
@@ -69,9 +69,9 @@ COPYING
 COPYING.1
 EOF
 
-test_expect_success \
-    'validate output from rename/copy detection (#2)' \
-    'compare_diff_raw_z current expected'
+test_expect_success 'validate output from rename/copy detection (#2)' '
+    compare_diff_raw_z current expected
+'
 
 ################################################################
 
@@ -80,10 +80,10 @@ test_expect_success \
 # anything about rezrov or COPYING, since the revised again diff-raw
 # nows how to say Copy.
 
-test_expect_success \
-    'prepare work tree once again' \
-    'COPYING_test_data >COPYING &&
-     git update-index --add --remove COPYING COPYING.1'
+test_expect_success 'prepare work tree once again' '
+    COPYING_test_data >COPYING &&
+    git update-index --add --remove COPYING COPYING.1
+'
 
 git diff-index -z -C --find-copies-harder $tree >current
 cat >expected <<EOF
@@ -92,8 +92,8 @@ COPYING
 COPYING.1
 EOF
 
-test_expect_success \
-    'validate output from rename/copy detection (#3)' \
-    'compare_diff_raw_z current expected'
+test_expect_success 'validate output from rename/copy detection (#3)' '
+    compare_diff_raw_z current expected
+'
 
 test_done

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/3] Update t4009 to use modern style.
  2026-09-10 17:07 ` [PATCH v2 0/3] Update t40* tests " Mark C. Chu-Carroll via B4 Relay
  2026-09-10 17:07   ` [PATCH v2 1/3] Update t4001 to use modern syntax Mark C. Chu-Carroll via B4 Relay
@ 2026-09-10 17:07   ` Mark C. Chu-Carroll via B4 Relay
  2026-09-10 17:07   ` [PATCH v2 3/3] Update t4010 " Mark C. Chu-Carroll via B4 Relay
  2 siblings, 0 replies; 10+ messages in thread
From: Mark C. Chu-Carroll via B4 Relay @ 2026-09-10 17:07 UTC (permalink / raw)
  To: git; +Cc: Mark C. Chu-Carroll

From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>

---
 t/t4009-diff-rename-4.sh | 113 ++++++++++++++++++++++-------------------------
 1 file changed, 54 insertions(+), 59 deletions(-)

diff --git a/t/t4009-diff-rename-4.sh b/t/t4009-diff-rename-4.sh
index 198de5d039..7a48a7011c 100755
--- a/t/t4009-diff-rename-4.sh
+++ b/t/t4009-diff-rename-4.sh
@@ -10,67 +10,64 @@ test_description='Same rename detection as t4003 but testing diff-raw -z.
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
-test_expect_success  'prepare reference tree' '
+
+
+test_expect_success 'validate output from rename/copy detection (#1)' '
+    # prepare reference tree
     COPYING_test_data >COPYING &&
     echo frotz >rezrov &&
     git update-index --add COPYING rezrov &&
     orig=$(git hash-object COPYING) &&
     tree=$(git write-tree) &&
-    echo $tree
-'
-
-test_expect_success 'prepare work tree' '
+    echo $tree &&
+    # prepare work tree
     sed -e "s/HOWEVER/However/" <COPYING >COPYING.1 &&
     sed -e "s/GPL/G.P.L/g" <COPYING >COPYING.2 &&
     rm -f COPYING &&
     c1=$(git hash-object COPYING.1) &&
     c2=$(git hash-object COPYING.2) &&
-    git update-index --add --remove COPYING COPYING.?
-'
-
-# tree has COPYING and rezrov.  work tree has COPYING.1 and COPYING.2,
-# both are slightly edited, and unchanged rezrov.  We say COPYING.1
-# and COPYING.2 are based on COPYING, and do not say anything about
-# rezrov.
-
-git diff-index -z -C $tree >current
-
-cat >expected <<EOF
-:100644 100644 $orig $c1 C1234
-COPYING
-COPYING.1
-:100644 100644 $orig $c2 R1234
-COPYING
-COPYING.2
-EOF
-
-test_expect_success 'validate output from rename/copy detection (#1)' '
-    compare_diff_raw_z current expected
+	git update-index --add --remove COPYING COPYING.? &&
+
+	# tree has COPYING and rezrov.  work tree has COPYING.1 and COPYING.2,
+	# both are slightly edited, and unchanged rezrov.  We say COPYING.1
+	# and COPYING.2 are based on COPYING, and do not say anything about
+	# rezrov.
+
+    cat >expect <<-EOF &&
+	:100644 100644 $orig $c1 C1234
+	COPYING
+	COPYING.1
+	:100644 100644 $orig $c2 R1234
+	COPYING
+	COPYING.2
+	EOF
+
+    git diff-index -z -C $tree >actual &&
+    compare_diff_raw_z actual expect
 '
 
 ################################################################
 
-test_expect_success 'prepare work tree again' '
-    mv COPYING.2 COPYING &&
-    git update-index --add --remove COPYING COPYING.1 COPYING.2
-'
-
-# tree has COPYING and rezrov.  work tree has COPYING and COPYING.1,
-# both are slightly edited, and unchanged rezrov.  We say COPYING.1
-# is based on COPYING and COPYING is still there, and do not say anything
-# about rezrov.
-
-git diff-index -z -C $tree >current
-cat >expected <<EOF
-:100644 100644 $orig $c2 M
-COPYING
-:100644 100644 $orig $c1 C1234
-COPYING
-COPYING.1
-EOF
-
 test_expect_success 'validate output from rename/copy detection (#2)' '
-    compare_diff_raw_z current expected
+    # prepare work tree again
+    mv COPYING.2 COPYING &&
+    git update-index --add --remove COPYING COPYING.1 COPYING.2 &&
+
+	# tree has COPYING and rezrov.  work tree has COPYING and COPYING.1,
+	# both are slightly edited, and unchanged rezrov.  We say COPYING.1
+	# is based on COPYING and COPYING is still there, and do not say anything
+	# about rezrov.
+
+	git diff-index -z -C $tree >actual &&
+	cat >expect <<-EOF &&
+	:100644 100644 $orig $c2 M
+	COPYING
+	:100644 100644 $orig $c1 C1234
+	COPYING
+	COPYING.1
+	EOF
+
+    compare_diff_raw_z actual expect
 '
 
 ################################################################
@@ -80,20 +77,18 @@ test_expect_success 'validate output from rename/copy detection (#2)' '
 # anything about rezrov or COPYING, since the revised again diff-raw
 # nows how to say Copy.
 
-test_expect_success 'prepare work tree once again' '
-    COPYING_test_data >COPYING &&
-    git update-index --add --remove COPYING COPYING.1
-'
-
-git diff-index -z -C --find-copies-harder $tree >current
-cat >expected <<EOF
-:100644 100644 $orig $c1 C1234
-COPYING
-COPYING.1
-EOF
-
 test_expect_success 'validate output from rename/copy detection (#3)' '
-    compare_diff_raw_z current expected
+    # prepare work tree once again
+    COPYING_test_data >COPYING &&
+    git update-index --add --remove COPYING COPYING.1 &&
+    git diff-index -z -C --find-copies-harder $tree >actual &&
+    cat >expect <<-EOF &&
+	:100644 100644 $orig $c1 C1234
+	COPYING
+	COPYING.1
+	EOF
+
+    compare_diff_raw_z actual expect
 '
 
 test_done

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/3] Update t4010 to use modern style.
  2026-09-10 17:07 ` [PATCH v2 0/3] Update t40* tests " Mark C. Chu-Carroll via B4 Relay
  2026-09-10 17:07   ` [PATCH v2 1/3] Update t4001 to use modern syntax Mark C. Chu-Carroll via B4 Relay
  2026-09-10 17:07   ` [PATCH v2 2/3] Update t4009 to use modern style Mark C. Chu-Carroll via B4 Relay
@ 2026-09-10 17:07   ` Mark C. Chu-Carroll via B4 Relay
  2 siblings, 0 replies; 10+ messages in thread
From: Mark C. Chu-Carroll via B4 Relay @ 2026-09-10 17:07 UTC (permalink / raw)
  To: git; +Cc: Mark C. Chu-Carroll

From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>

---
 t/t4010-diff-pathspec.sh | 88 +++++++++++++++++-------------------------------
 1 file changed, 31 insertions(+), 57 deletions(-)

diff --git a/t/t4010-diff-pathspec.sh b/t/t4010-diff-pathspec.sh
index 8d980823b0..76ddd3ff4e 100755
--- a/t/t4010-diff-pathspec.sh
+++ b/t/t4010-diff-pathspec.sh
@@ -13,60 +13,34 @@ Prepare:
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
-test_expect_success \
-    setup \
-    'echo frotz >file0 &&
-     mkdir path1 &&
-     echo rezrov >path1/file1 &&
-     before0=$(git hash-object file0) &&
-     before1=$(git hash-object path1/file1) &&
-     git update-index --add file0 path1/file1 &&
-     tree=$(git write-tree) &&
-     echo "$tree" &&
-     echo nitfol >file0 &&
-     echo yomin >path1/file1 &&
-     after0=$(git hash-object file0) &&
-     after1=$(git hash-object path1/file1) &&
-     git update-index file0 path1/file1'
-
-cat >expected <<\EOF
-EOF
-test_expect_success \
-    'limit to path should show nothing' \
-    'git diff-index --cached $tree -- path >current &&
-     compare_diff_raw current expected'
-
-cat >expected <<EOF
-:100644 100644 $before1 $after1 M	path1/file1
-EOF
-test_expect_success \
-    'limit to path1 should show path1/file1' \
-    'git diff-index --cached $tree -- path1 >current &&
-     compare_diff_raw current expected'
-
-cat >expected <<EOF
-:100644 100644 $before1 $after1 M	path1/file1
-EOF
-test_expect_success \
-    'limit to path1/ should show path1/file1' \
-    'git diff-index --cached $tree -- path1/ >current &&
-     compare_diff_raw current expected'
-
-cat >expected <<EOF
-:100644 100644 $before1 $after1 M	path1/file1
-EOF
-test_expect_success \
-    '"*file1" should show path1/file1' \
-    'git diff-index --cached $tree -- "*file1" >current &&
-     compare_diff_raw current expected'
-
-cat >expected <<EOF
-:100644 100644 $before0 $after0 M	file0
-EOF
-test_expect_success \
-    'limit to file0 should show file0' \
-    'git diff-index --cached $tree -- file0 >current &&
-     compare_diff_raw current expected'
+
+test_expect_success 'limit to path should show nothing' '
+	echo frotz >file0 &&
+	mkdir path1 &&
+	echo rezrov >path1/file1 &&
+	before0=$(git hash-object file0) &&
+	before1=$(git hash-object path1/file1) &&
+	git update-index --add file0 path1/file1 &&
+	tree=$(git write-tree) &&
+	echo "$tree" &&
+	echo nitfol >file0 &&
+	echo yomin >path1/file1 &&
+	after0=$(git hash-object file0) &&
+	after1=$(git hash-object path1/file1) &&
+	git update-index file0 path1/file1 &&
+	: >expected &&
+	git diff-index --cached $tree -- path >current &&
+	compare_diff_raw current expected
+'
+
+test_expect_success 'limit to path1 should show path1/file1' '
+	cat >expected <<-EOF &&
+	:100644 100644 $before1 $after1 M	path1/file1
+	EOF
+
+	git diff-index --cached $tree -- path1 >current &&
+	compare_diff_raw current expected
+'
 
 test_expect_success 'limit to path1/ should show path1/file1' '
 	cat >expected <<-EOF &&
@@ -80,7 +54,7 @@ test_expect_success '"*file1" should show path1/file1' '
 	cat >expected <<-EOF &&
 	:100644 100644 $before1 $after1 M	path1/file1
 	EOF
-    
+
 	git diff-index --cached $tree -- "*file1" >current &&
 	compare_diff_raw current expected
 '
@@ -89,13 +63,13 @@ test_expect_success 'limit to file0 should show file0' '
 	cat >expected <<-EOF &&
 	:100644 100644 $before0 $after0 M	file0
 	EOF
-    
+
 	git diff-index --cached $tree -- file0 >current &&
 	compare_diff_raw current expected
 '
 
 test_expect_success 'limit to file0/ should emit nothing.' '
-    : >expected &&     
+    : >expected &&
 	git diff-index --cached $tree -- file0/ >current &&
 	compare_diff_raw current expected
 '

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/3] Update t4001 to use modern syntax.
  2026-09-10 17:07   ` [PATCH v2 1/3] Update t4001 to use modern syntax Mark C. Chu-Carroll via B4 Relay
@ 2026-09-10 17:56     ` Junio C Hamano
  0 siblings, 0 replies; 10+ messages in thread
From: Junio C Hamano @ 2026-09-10 17:56 UTC (permalink / raw)
  To: Mark C. Chu-Carroll via B4 Relay; +Cc: git, Mark C. Chu-Carroll

"Mark C. Chu-Carroll via B4 Relay"
<devnull+markchucarroll.fastmail.com@kernel.org> writes:

> Subject: [PATCH v2 1/3] Update t4001 to use modern syntax.

Documentation/SubmittingPatches::[[summary-section]]

Also "git log --oneline --no-merges -60 origin -- t/" may give us
some hint.

> From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>
>

Documentation/SubmittingPatches::[[describe-changes]]

> ---

Documentation/SubmittingPatches::[[sign-off]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-09-10 17:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08 19:44 [PATCH 0/3] Update t40* tests to use modern style Mark C. Chu-Carroll via B4 Relay
2026-09-08 19:44 ` [PATCH 1/3] Update t4001 to use modern syntax Mark C. Chu-Carroll via B4 Relay
2026-09-08 20:48   ` Junio C Hamano
2026-09-08 19:44 ` [PATCH 2/3] Update t4009 to use modern style Mark C. Chu-Carroll via B4 Relay
2026-09-08 19:44 ` [PATCH 3/3] Update t4010 " Mark C. Chu-Carroll via B4 Relay
2026-09-10 17:07 ` [PATCH v2 0/3] Update t40* tests " Mark C. Chu-Carroll via B4 Relay
2026-09-10 17:07   ` [PATCH v2 1/3] Update t4001 to use modern syntax Mark C. Chu-Carroll via B4 Relay
2026-09-10 17:56     ` Junio C Hamano
2026-09-10 17:07   ` [PATCH v2 2/3] Update t4009 to use modern style Mark C. Chu-Carroll via B4 Relay
2026-09-10 17:07   ` [PATCH v2 3/3] Update t4010 " Mark C. Chu-Carroll via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox