summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-05-13 02:24:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-14 02:02:00 (GMT)
commit198857bf7ed1dc2403884c1e6900650b50e0f0a9 (patch)
tree8ec7ad159c52a43a9ffc524428ed474835648bfc
parentd16ab63429ba7278a2ec6cd5a5905875982242eb (diff)
downloadgit-198857bf7ed1dc2403884c1e6900650b50e0f0a9.zip
git-198857bf7ed1dc2403884c1e6900650b50e0f0a9.tar.gz
git-198857bf7ed1dc2403884c1e6900650b50e0f0a9.tar.bz2
t/test-lib: introduce ZERO_OID
Currently we have a variable, $_z40, which contains the all-zero object ID. However, with NewHash, we'll have an all-zero object ID which is longer than 40 hex characters. In such a case, $_z40 will be a confusing name. Create a $ZERO_OID variable which will always reflect the all-zeros object ID, regardless of the length of the current hash. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--t/test-lib.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index fce728d..58c2ea5 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -184,6 +184,7 @@ _x40="$_x35$_x05"
# Zero SHA-1
_z40=0000000000000000000000000000000000000000
+ZERO_OID=$_z40
EMPTY_TREE=4b825dc642cb6eb9a060e54bf8d69288fbee4904
EMPTY_BLOB=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
@@ -195,7 +196,7 @@ LF='
# when case-folding filenames
u200c=$(printf '\342\200\214')
-export _x05 _x35 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB
+export _x05 _x35 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID
# Each test should start with something like this, after copyright notices:
#