summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2013-09-24 23:36:08 -0700
committerJonathan Nieder <jrnieder@gmail.com>2013-09-24 23:36:08 -0700
commit5636a20070c80dec23cc6d6180cb1dd958e23bca (patch)
tree78ae41beca656e291696a58addf5a597b2d42018 /git-submodule.sh
parent80f165a58a41ffd37ec24022db8e568bc5165075 (diff)
parentbb58b696c6ad810560d361b640580715a90382cb (diff)
downloadgit-5636a20070c80dec23cc6d6180cb1dd958e23bca.tar.gz
Merge branch 'bc/submodule-status-ignored'
* bc/submodule-status-ignored: Improve documentation concerning the status.submodulesummary setting submodule: don't print status output with ignore=all submodule: fix confusing variable name
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index c17bef1062..896f1c9b82 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -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
)