Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-07-16 08:06:25 +0300
committerJunio C Hamano <gitster@pobox.com>2016-07-18 23:45:32 +0300
commit378932d3c3214cf658805af20c4bd101922d8fcd (patch)
tree19edf930c44afa447b70e538b56a0b676447900f /t/t1700-split-index.sh
parentf9e7d9f8c3e32280418a0bedd9d37f2a0cc2e2b9 (diff)
test-lib.sh: introduce and use $EMPTY_BLOB
Similar to $EMPTY_TREE this makes it easier to recognize this special SHA-1 and change hash later. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1700-split-index.sh')
-rwxr-xr-xt/t1700-split-index.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
index 8aef49f236..292a0720fc 100755
--- a/t/t1700-split-index.sh
+++ b/t/t1700-split-index.sh
@@ -33,14 +33,14 @@ test_expect_success 'add one file' '
git update-index --add one &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
+100644 $EMPTY_BLOB 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
test-dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<EOF &&
base $base
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
+100644 $EMPTY_BLOB 0 one
replacements:
deletions:
EOF
@@ -51,7 +51,7 @@ test_expect_success 'disable split index' '
git update-index --no-split-index &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
+100644 $EMPTY_BLOB 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
@@ -67,7 +67,7 @@ test_expect_success 'enable split index again, "one" now belongs to base index"'
git update-index --split-index &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
+100644 $EMPTY_BLOB 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
@@ -105,7 +105,7 @@ test_expect_success 'add another file, which stays index' '
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 one
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 two
+100644 $EMPTY_BLOB 0 two
EOF
test_cmp ls-files.expect ls-files.actual &&
@@ -113,7 +113,7 @@ EOF
q_to_tab >expect <<EOF &&
$BASE
100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0Q
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 two
+100644 $EMPTY_BLOB 0 two
replacements: 0
deletions:
EOF
@@ -159,14 +159,14 @@ test_expect_success 'add original file back' '
git update-index --add one &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
+100644 $EMPTY_BLOB 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
test-dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<EOF &&
$BASE
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
+100644 $EMPTY_BLOB 0 one
replacements:
deletions: 0
EOF
@@ -178,8 +178,8 @@ test_expect_success 'add new file' '
git update-index --add two &&
git ls-files --stage >actual &&
cat >expect <<EOF &&
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 two
+100644 $EMPTY_BLOB 0 one
+100644 $EMPTY_BLOB 0 two
EOF
test_cmp expect actual
'
@@ -188,8 +188,8 @@ test_expect_success 'unify index, two files remain' '
git update-index --no-split-index &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
-100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 two
+100644 $EMPTY_BLOB 0 one
+100644 $EMPTY_BLOB 0 two
EOF
test_cmp ls-files.expect ls-files.actual &&