diff options
author | Sven van Haastregt <svenvh@gmail.com> | 2019-02-03 21:00:27 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-02-04 13:33:56 -0800 |
commit | 0586a438f64bc13d6634379cbeeaa96c9e8241d9 (patch) | |
tree | a0bea11a27cc9c805b9801e5d4726592b3a69c70 /t/t5523-push-upstream.sh | |
parent | Git 2.20.1 (diff) | |
download | tgif-0586a438f64bc13d6634379cbeeaa96c9e8241d9.tar.xz |
git-submodule.sh: shorten submodule SHA-1s using rev-parse
Until now, `git submodule summary` was always emitting 7-character
SHA-1s that have a higher chance of being ambiguous for larger
repositories. Use `git rev-parse --short` instead, which will
determine suitable short SHA-1 lengths.
When a submodule hasn't been initialized with "submodule init" or
not cloned, `git rev-parse` would not work in it yet; as a fallback,
use the original method of cutting at 7 hexdigits.
Signed-off-by: Sven van Haastregt <svenvh@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5523-push-upstream.sh')
0 files changed, 0 insertions, 0 deletions