connect.c: mark more strings for translation
[gitweb.git] / t / t4014-format-patch.sh
index 6ea08fd5e9c21bc1efe9726c8745dd1397c3ddab..028d5507a6b684208ba82292379ec74bc6628574 100755 (executable)
@@ -578,7 +578,11 @@ test_expect_success 'excessive subject' '
 
        rm -rf patches/ &&
        git checkout side &&
+       before=$(git hash-object file) &&
+       before=$(git rev-parse --short $before) &&
        for i in 5 6 1 2 3 A 4 B C 7 8 9 10 D E F; do echo "$i"; done >>file &&
+       after=$(git hash-object file) &&
+       after=$(git rev-parse --short $after) &&
        git update-index file &&
        git commit -m "This is an excessively long subject line for a message due to the habit some projects have of not having a short, one-line subject at the start of the commit message, but rather sticking a whole paragraph right at the start as the only thing in the commit message. It had better not become the filename for the patch." &&
        git format-patch -o patches/ master..side &&
@@ -586,7 +590,6 @@ test_expect_success 'excessive subject' '
 '
 
 test_expect_success 'cover-letter inherits diff options' '
-
        git mv file foo &&
        git commit -m foo &&
        git format-patch --no-renames --cover-letter -1 &&
@@ -616,7 +619,7 @@ test_expect_success 'shortlog of cover-letter wraps overly-long onelines' '
 '
 
 cat > expect << EOF
-index 40f36c6..2dc5c23 100644
+index $before..$after 100644
 --- a/file
 +++ b/file
 @@ -13,4 +13,20 @@ C
@@ -640,7 +643,7 @@ test_expect_success 'format-patch respects -U' '
 cat > expect << EOF
 
 diff --git a/file b/file
-index 40f36c6..2dc5c23 100644
+index $before..$after 100644
 --- a/file
 +++ b/file
 @@ -14,3 +14,19 @@ C
@@ -1523,14 +1526,14 @@ test_expect_success 'cover letter auto user override' '
 test_expect_success 'format-patch --zero-commit' '
        git format-patch --zero-commit --stdout v2..v1 >patch2 &&
        grep "^From " patch2 | sort | uniq >actual &&
-       echo "From $_z40 Mon Sep 17 00:00:00 2001" >expect &&
+       echo "From $ZERO_OID Mon Sep 17 00:00:00 2001" >expect &&
        test_cmp expect actual
 '
 
 test_expect_success 'From line has expected format' '
        git format-patch --stdout v2..v1 >patch2 &&
        grep "^From " patch2 >from &&
-       grep "^From $_x40 Mon Sep 17 00:00:00 2001$" patch2 >filtered &&
+       grep "^From $OID_REGEX Mon Sep 17 00:00:00 2001$" patch2 >filtered &&
        test_cmp from filtered
 '