Code

Merge branch 'maint'
[git.git] / git-submodule.sh
index 65178ae8e32bb20c65c42eb9668fb0ffec749007..b63e5c30874bfa382c7d6d0ca1942d116930b62a 100755 (executable)
@@ -424,7 +424,7 @@ cmd_summary() {
        cd_to_toplevel
        # Get modified modules cared by user
        modules=$(git diff-index $cached --raw $head -- "$@" |
-               grep -e '^:160000' -e '^:[0-7]* 160000' |
+               egrep '^:([0-7]* )?160000' |
                while read mod_src mod_dst sha1_src sha1_dst status name
                do
                        # Always show modules deleted or type-changed (blob<->module)
@@ -438,7 +438,7 @@ cmd_summary() {
        test -z "$modules" && return
 
        git diff-index $cached --raw $head -- $modules |
-       grep -e '^:160000' -e '^:[0-7]* 160000' |
+       egrep '^:([0-7]* )?160000' |
        cut -c2- |
        while read mod_src mod_dst sha1_src sha1_dst status name
        do