diff options
author | Jeff King <peff@peff.net> | 2008-03-12 17:32:17 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-13 00:57:52 -0700 |
commit | aadbe44f883859536c5320e0ac1d6ed122c45671 (patch) | |
tree | 5552c7d0999106d0198ed59403b21dcc1c5111e6 /t/t5400-send-pack.sh | |
parent | e85fe4d85bc7654af20ccf8054ab6922665405e5 (diff) | |
download | git-aadbe44f883859536c5320e0ac1d6ed122c45671.tar.gz |
grep portability fix: don't use "-e" or "-q"
System V versions of grep (such as Solaris /usr/bin/grep)
don't understand either of these options. git's usage of
"grep -e pattern" fell into one of two categories:
1. equivalent to "grep pattern". -e is only useful here if
the pattern begins with a "-", but all of the patterns
are hardcoded and do not begin with a dash.
2. stripping comments and blank lines with
grep -v -e "^$" -e "^#"
We can fortunately do this in the affirmative as
grep '^[^#]'
Uses of "-q" can be replaced with redirection to /dev/null.
In many tests, however, "grep -q" is used as "if this string
is in the expected output, we are OK". In this case, it is
fine to just remove the "-q" entirely; it simply makes the
"verbose" mode of the test slightly more verbose.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5400-send-pack.sh')
-rwxr-xr-x | t/t5400-send-pack.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index 2d0c07fd6a..2b6b6e3f71 100755 --- a/t/t5400-send-pack.sh +++ b/t/t5400-send-pack.sh @@ -120,7 +120,7 @@ test_expect_success \ cd .. && git-clone parent child && cd child && git-push --all && cd ../parent && - git-branch -a >branches && ! grep -q origin/master branches + git-branch -a >branches && ! grep origin/master branches ' rewound_push_setup() { |