aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-07-05 16:23:58 +0200
committerJunio C Hamano <gitster@pobox.com>2008-07-06 19:23:00 -0700
commit1c6669351a47c834cceb75d6044a1aae259fc69f (patch)
tree27950c2fef08c14a3410fc6691cf37aa9167397a
parent7b9c0a69a5f64fffb5de8b49a96f41ac35b4a84f (diff)
downloadgit-1c6669351a47c834cceb75d6044a1aae259fc69f.tar.gz
git-1c6669351a47c834cceb75d6044a1aae259fc69f.tar.xz
Fix t7601-merge-pull-config.sh on AIX
The test failed on AIX (and likely other OS, such as apparently OSX) where wc -l outputs whitespace. Also, avoid unnecessary eval in conflict_count(). Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t7601-merge-pull-config.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh
index 32585f8e0..95b4d71c5 100755
--- a/t/t7601-merge-pull-config.sh
+++ b/t/t7601-merge-pull-config.sh
@@ -70,10 +70,10 @@ test_expect_success 'merge c1 with c2 and c3 (recursive and octopus in pull.octo
conflict_count()
{
- eval $1=`{
+ {
git diff-files --name-only
git ls-files --unmerged
- } | wc -l`
+ } | wc -l
}
# c4 - c5
@@ -115,15 +115,15 @@ test_expect_success 'merge picks up the best result' '
git config pull.twohead "recursive resolve" &&
git reset --hard c5 &&
git merge -s resolve c6
- conflict_count resolve_count &&
+ resolve_count=$(conflict_count) &&
git reset --hard c5 &&
git merge -s recursive c6
- conflict_count recursive_count &&
+ recursive_count=$(conflict_count) &&
git reset --hard c5 &&
git merge c6
- conflict_count auto_count &&
- test "$auto_count" = "$recursive_count" &&
- test "$auto_count" != "$resolve_count"
+ auto_count=$(conflict_count) &&
+ test $auto_count = $recursive_count &&
+ test $auto_count != $resolve_count
'
test_done