The '>' character is not a legal part of filenames on Windows. So let's
just not use it in Git's source code. This poses a challenge in the test
script t4013 which distills command-lines into file names (so that the
expected outcome can be stored in files with said names).

We have to take particular care not to confound the existing conversion
of unwanted characters to underscores with the new substitution of '>':
the existing conversion chose to collapse runs of multiple unwanted
characters into a single underscore. If we allowed '>' to be collapsed,
too, the file name generated from the command "diff [...]=-- [...]"
would be identical to the one generated from "diff [...]=--> [...]".

Please squash this patch into

Signed-off-by: Johannes Schindelin <>
Fetch-It-Via: git fetch mingw-t4013-v1

        For the record: this prevented my beautiful CI jobs from even
        checking out the source code for `pu` in the last days.

        Junio, please let me know if you would prefer this as a separate

 t/                                                 | 2 +-
 ...aster^_side => diff.diff_--diff-line-prefix=--__master_master^_side} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename t/t4013/{diff.diff_--diff-line-prefix=-->_master_master^_side => 
diff.diff_--diff-line-prefix=--__master_master^_side} (100%)

diff --git a/t/ b/t/
index 5204645..84e2ee0 100755
--- a/t/
+++ b/t/
@@ -115,7 +115,7 @@ do
        case "$cmd" in
        '' | '#'*) continue ;;
-       test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g')
+       test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g' -e 'y/>/_/')
        pfx=$(printf "%04d" $test_count)
diff --git a/t/t4013/diff.diff_--diff-line-prefix=-->_master_master^_side 
similarity index 100%
rename from t/t4013/diff.diff_--diff-line-prefix=-->_master_master^_side
rename to t/t4013/diff.diff_--diff-line-prefix=--__master_master^_side

base-commit: 945e149951a152207b56d5e49ff5167d151a4c89
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to