Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
lib-submodule-update.sh: replace sha1 by hash
author
Stefan Beller
<sbeller@google.com>
Tue, 14 Mar 2017 21:46:29 +0000
(14:46 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 16 Mar 2017 01:15:53 +0000
(18:15 -0700)
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>
t/lib-submodule-update.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
2f70edc
)
diff --git
a/t/lib-submodule-update.sh
b/t/lib-submodule-update.sh
index 00128f28b5a0f4df0d8ac97b19dcf3e7c316d38d..f52c49c838eef635d3dd1d413523f1a423675fc7 100755
(executable)
--- 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