aboutsummaryrefslogtreecommitdiff
path: root/t/lib-submodule-update.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-03-14 14:46:29 -0700
committerJunio C Hamano <gitster@pobox.com>2017-03-15 18:15:53 -0700
commit03c7e2a321f11ba75774a5ef5a3e75b2595e150b (patch)
tree8258c3cc02c5d0f0f528fd35b8a6ed922cc00344 /t/lib-submodule-update.sh
parent2f70edccb4c424ded7dc9afa4da6b17e213a5f96 (diff)
downloadgit-03c7e2a321f11ba75774a5ef5a3e75b2595e150b.tar.gz
git-03c7e2a321f11ba75774a5ef5a3e75b2595e150b.tar.xz
lib-submodule-update.sh: replace sha1 by hash
Cleaning up code by generalising it. Currently the mailing list discusses yet again how to migrate away from sha1. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-submodule-update.sh')
-rwxr-xr-xt/lib-submodule-update.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index 00128f28b..f52c49c83 100755
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -171,9 +171,9 @@ reset_work_tree_to () {
git checkout -f "$1" &&
git status -u -s >actual &&
test_must_be_empty actual &&
- sha1=$(git rev-parse --revs-only HEAD:sub1) &&
- if test -n "$sha1" &&
- test $(cd "../submodule_update_sub1" && git rev-parse --verify "$sha1^{commit}")
+ hash=$(git rev-parse --revs-only HEAD:sub1) &&
+ if test -n "$hash" &&
+ test $(cd "../submodule_update_sub1" && git rev-parse --verify "$hash^{commit}")
then
git submodule update --init --recursive "sub1"
fi