summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-submodule.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 5e608f8bad..e26146e721 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -850,8 +850,11 @@ cmd_summary() {
;;
esac
- sha1_abbr_src=$(echo $sha1_src | cut -c1-7)
- sha1_abbr_dst=$(echo $sha1_dst | cut -c1-7)
+ sha1_abbr_src=$(GIT_DIR="$name/.git" git rev-parse --short $sha1_src 2>/dev/null ||
+ echo $sha1_src | cut -c1-7)
+ sha1_abbr_dst=$(GIT_DIR="$name/.git" git rev-parse --short $sha1_dst 2>/dev/null ||
+ echo $sha1_dst | cut -c1-7)
+
if test $status = T
then
blob="$(gettext "blob")"