From: Sven van Haastregt Date: Sun, 3 Feb 2019 21:00:27 +0000 (+0000) Subject: git-submodule.sh: shorten submodule SHA-1s using rev-parse X-Git-Tag: v2.21.0-rc0~10^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0586a438f64bc13d6634379cbeeaa96c9e8241d9?hp=0586a438f64bc13d6634379cbeeaa96c9e8241d9 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 Signed-off-by: Junio C Hamano ---