summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64c0d71)
raw | patch | inline | side by side (parent: 64c0d71)
author | Jeff King <peff@peff.net> | |
Wed, 14 May 2008 04:01:22 +0000 (00:01 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 14 May 2008 04:44:48 +0000 (21:44 -0700) |
On some shells (notably /bin/sh on FreeBSD 6.1), the
construct
foo && ! bar | baz
is true if
foo && baz
whereas for most other shells (such as bash) is true if
foo && ! baz
We can work around this by specifying
foo && ! (bar | baz)
which works everywhere.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
construct
foo && ! bar | baz
is true if
foo && baz
whereas for most other shells (such as bash) is true if
foo && ! baz
We can work around this by specifying
foo && ! (bar | baz)
which works everywhere.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/git-rebase.sh b/git-rebase.sh
index 9b13b833cb5762542848ee3e85e23d3ca0f76fa6..fbb0f288b3243bad5c358c6e8ecfb351aeaa52e8 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
mb=$(git merge-base "$onto" "$branch")
if test "$upstream" = "$onto" && test "$mb" = "$onto" &&
# linear history?
- ! git rev-list --parents "$onto".."$branch" | grep " .* " > /dev/null
+ ! (git rev-list --parents "$onto".."$branch" | grep " .* ") > /dev/null
then
# Lazily switch to the target branch if needed...
test -z "$switch_to" || git checkout "$switch_to"
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 496f4ec17217769228954116528b0fc0c1ef2a62..fdad7dad611b385f05779826bfa74f33d1f28d03 100755 (executable)
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
test_expect_success \
'the rebase operation should not have destroyed author information' \
- '! git log | grep "Author:" | grep "<>"'
+ '! (git log | grep "Author:" | grep "<>")'
test_expect_success 'rebase after merge master' '
git reset --hard topic &&
git merge master &&
git rebase master &&
- ! git show | grep "^Merge:"
+ ! (git show | grep "^Merge:")
'
test_expect_success 'rebase of history with merges is linearized' '
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 287e058e3766df129dcde82aeddecac59b46e2a6..68c5ddebdf565912af5f481283980169f069a7a6 100755 (executable)
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
test_expect_success '.gitignore is honored' '
git add . &&
- ! git ls-files | grep "\\.ig"
+ ! (git ls-files | grep "\\.ig")
'
test_expect_success 'error out when attempting to add ignored ones without -f' '
! git add a.?? &&
- ! git ls-files | grep "\\.ig"
+ ! (git ls-files | grep "\\.ig")
'
test_expect_success 'error out when attempting to add ignored ones without -f' '
! git add d.?? &&
- ! git ls-files | grep "\\.ig"
+ ! (git ls-files | grep "\\.ig")
'
test_expect_success 'add ignored ones with -f' '
diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
index b88b5bbd022bb3dd836d00f88a8e486c00285103..09fd91767297a8c59edb08944740bbcf08f8a7c4 100755 (executable)
--- a/t/t5302-pack-index.sh
+++ b/t/t5302-pack-index.sh
have_64bits=
if msg=$(git verify-pack -v "test-3-${pack3}.pack" 2>&1) ||
- ! echo "$msg" | grep "pack too large .* off_t"
+ ! (echo "$msg" | grep "pack too large .* off_t")
then
have_64bits=t
else
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index c0288f345fb5809d8606f4d3cfaf73d24d6c7281..89710afcb5141beee6b02d8a67e66e11c6f15ad0 100755 (executable)
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
test_expect_success \
"using paths with --interactive" \
"echo bong-o-bong >file &&
- ! echo 7 | git-commit -m foo --interactive file"
+ ! (echo 7 | git-commit -m foo --interactive file)"
test_expect_success \
"using invalid commit with -C" \