http-backend test: make empty CONTENT_LENGTH test more realistic
[gitweb.git] / t / t5300-pack-object.sh
index 54eff03851dfcb6ba0d4a41a4d0a221edde43729..87a590c4a952d743c2d9f8b0daac76d448f51e8e 100755 (executable)
@@ -471,9 +471,11 @@ test_expect_success 'pack-objects in too-many-packs mode' '
 
 test_expect_success \
     'fake a SHA1 hash collision' \
-    'test -f   .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67 &&
-     cp -f     .git/objects/9d/235ed07cd19811a6ceb342de82f190e49c9f68 \
-               .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67'
+    'long_a=$(git hash-object a | sed -e "s!^..!&/!") &&
+     long_b=$(git hash-object b | sed -e "s!^..!&/!") &&
+     test -f   .git/objects/$long_b &&
+     cp -f     .git/objects/$long_a \
+               .git/objects/$long_b'
 
 test_expect_success \
     'make sure index-pack detects the SHA1 collision' \