X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=git-submodule.sh;h=b5f2beee60ab59a04b5b236da8df39403009db1b;hb=c3f2358de39a8ac754ae68880a992835a84a6f0c;hp=5e608f8bad305fea40e9063b854bf1be24ebd448;hpb=37a99f8105ee9a1800a3ef2b00939bfdc38c9320;p=thirdparty%2Fgit.git diff --git a/git-submodule.sh b/git-submodule.sh index 5e608f8bad..b5f2beee60 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -548,7 +548,7 @@ cmd_update() do die_if_unmatched "$quickabort" "$sha1" - git submodule--helper ensure-core-worktree "$sm_path" + git submodule--helper ensure-core-worktree "$sm_path" || exit 1 update_module=$(git submodule--helper update-module-mode $just_cloned "$sm_path" $update) @@ -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")"