summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2008-10-22 15:22:53 -0400
committerJunio C Hamano <gitster@pobox.com>2008-10-22 18:06:34 -0700
commit759ad19e772a79a2a5ae6b7377d57eb21d29e6a0 (patch)
tree0783ea4d2dc59c3dfe36fecf47ef6909936831a4 /git-submodule.sh
parent20244ea2d09a3f5c3c83133014ca1e1b7b3d0227 (diff)
downloadgit-759ad19e772a79a2a5ae6b7377d57eb21d29e6a0.tar.gz
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 65178ae8e3..b63e5c3087 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