Skip to content

Commit

Permalink
Fix t7601-merge-pull-config.sh on AIX
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miklos Vajna authored and Junio C Hamano committed Jul 7, 2008
1 parent 7b9c0a6 commit 1c66693
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions t/t7601-merge-pull-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 1c66693

Please sign in to comment.