Skip to content

Commit 1c66693

Browse files
Miklos Vajnagitster
authored andcommitted
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>
1 parent 7b9c0a6 commit 1c66693

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

t/t7601-merge-pull-config.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ test_expect_success 'merge c1 with c2 and c3 (recursive and octopus in pull.octo
7070

7171
conflict_count()
7272
{
73-
eval $1=`{
73+
{
7474
git diff-files --name-only
7575
git ls-files --unmerged
76-
} | wc -l`
76+
} | wc -l
7777
}
7878

7979
# c4 - c5
@@ -115,15 +115,15 @@ test_expect_success 'merge picks up the best result' '
115115
git config pull.twohead "recursive resolve" &&
116116
git reset --hard c5 &&
117117
git merge -s resolve c6
118-
conflict_count resolve_count &&
118+
resolve_count=$(conflict_count) &&
119119
git reset --hard c5 &&
120120
git merge -s recursive c6
121-
conflict_count recursive_count &&
121+
recursive_count=$(conflict_count) &&
122122
git reset --hard c5 &&
123123
git merge c6
124-
conflict_count auto_count &&
125-
test "$auto_count" = "$recursive_count" &&
126-
test "$auto_count" != "$resolve_count"
124+
auto_count=$(conflict_count) &&
125+
test $auto_count = $recursive_count &&
126+
test $auto_count != $resolve_count
127127
'
128128

129129
test_done

0 commit comments

Comments
 (0)