]> git.scripts.mit.edu Git - git.git/blobdiff - git-submodule.sh
fsck: complain about HFS+ ".git" aliases in trees
[git.git] / git-submodule.sh
index c17bef10629d3fe53e03647ee16de7f9de24dfb5..896f1c9b820b6627da8d591469172d749bf0e700 100755 (executable)
@@ -1032,13 +1032,20 @@ cmd_summary() {
        # Get modified modules cared by user
        modules=$(git $diff_cmd $cached --ignore-submodules=dirty --raw $head -- "$@" |
                sane_egrep '^:([0-7]* )?160000' |
-               while read mod_src mod_dst sha1_src sha1_dst status name
+               while read mod_src mod_dst sha1_src sha1_dst status sm_path
                do
                        # Always show modules deleted or type-changed (blob<->module)
-                       test $status = D -o $status = T && echo "$name" && continue
+                       test $status = D -o $status = T && echo "$sm_path" && continue
+                       # Respect the ignore setting for --for-status.
+                       if test -n "$for_status"
+                       then
+                               name=$(module_name "$sm_path")
+                               ignore_config=$(get_submodule_config "$name" ignore none)
+                               test $status != A -a $ignore_config = all && continue
+                       fi
                        # Also show added or modified modules which are checked out
-                       GIT_DIR="$name/.git" git-rev-parse --git-dir >/dev/null 2>&1 &&
-                       echo "$name"
+                       GIT_DIR="$sm_path/.git" git-rev-parse --git-dir >/dev/null 2>&1 &&
+                       echo "$sm_path"
                done
        )