From: Jeff King Date: Wed, 22 Oct 2008 19:22:53 +0000 (-0400) Subject: submodule: fix some non-portable grep invocations X-Git-Tag: v1.6.1-rc1~110 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=759ad19e772a79a2a5ae6b7377d57eb21d29e6a0;p=git.git submodule: fix some non-portable grep invocations Not all greps support "-e", but in this case we can easily convert it to a single extended regex. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/git-submodule.sh b/git-submodule.sh index 65178ae8e..b63e5c308 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -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