* jk/portable:
t6000lib: re-fix tr portability
t7505: use SHELL_PATH in hook
t9112: add missing #!/bin/sh header
filter-branch: use $SHELL_PATH instead of 'sh'
filter-branch: don't use xargs -0
add NO_EXTERNAL_GREP build option
t6000lib: tr portability fix
t4020: don't use grep -a
add test_cmp function for test scripts
remove use of "tail -n 1" and "tail -1"
grep portability fix: don't use "-e" or "-q"
more tr portability test script fixes
t0050: perl portability fix
tr portability fixes
@ -122,8 +122,8 @@ test_expect_success 'reflog for the branch shows state before rebase' '
@@ -122,8 +122,8 @@ test_expect_success 'reflog for the branch shows state before rebase' '
test_expect_success 'exchange two commits' '
FAKE_LINES="2 1" git rebase -i HEAD~2 &&
test H = $(git cat-file commit HEAD^ | tail -n 1) &&
test G = $(git cat-file commit HEAD | tail -n 1)
test H = $(git cat-file commit HEAD^ | sed -ne \$p) &&
test G = $(git cat-file commit HEAD | sed -ne \$p)
@ -57,7 +57,7 @@ test_expect_success 'cross renames to be detected for regular files' '
@@ -57,7 +57,7 @@ test_expect_success 'cross renames to be detected for regular files' '
echo "R100 foo bar"
echo "R100 bar foo"
} | sort >expect &&
diff -u expect actual
test_cmp expect actual
'
@ -68,7 +68,7 @@ test_expect_success 'cross renames to be detected for typechange' '
@@ -68,7 +68,7 @@ test_expect_success 'cross renames to be detected for typechange' '
echo "R100 foo bar"
echo "R100 bar foo"
} | sort >expect &&
diff -u expect actual
test_cmp expect actual
'
@ -79,7 +79,7 @@ test_expect_success 'moves and renames' '
@@ -79,7 +79,7 @@ test_expect_success 'moves and renames' '
@ -37,7 +37,7 @@ test_expect_success 'hunk header truncation with an overly long line' '
@@ -37,7 +37,7 @@ test_expect_success 'hunk header truncation with an overly long line' '
@ -22,14 +22,14 @@ test_expect_success 'am regularly from stdin' '
@@ -22,14 +22,14 @@ test_expect_success 'am regularly from stdin' '
git checkout initial &&
git am <patchfile &&
git diff master >actual &&
diff -u expect actual
test_cmp expect actual
'
test_expect_success 'am regularly from file' '
git checkout initial &&
git am patchfile &&
git diff master >actual &&
diff -u expect actual
test_cmp expect actual
'
test_expect_success 'am regularly from stdin in subdirectory' '
@ -41,7 +41,7 @@ test_expect_success 'am regularly from stdin in subdirectory' '
@@ -41,7 +41,7 @@ test_expect_success 'am regularly from stdin in subdirectory' '
git am <../patchfile
) &&
git diff master>actual &&
diff -u expect actual
test_cmp expect actual
'
test_expect_success 'am regularly from file in subdirectory' '
@ -53,7 +53,7 @@ test_expect_success 'am regularly from file in subdirectory' '
@@ -53,7 +53,7 @@ test_expect_success 'am regularly from file in subdirectory' '
git am ../patchfile
) &&
git diff master >actual &&
diff -u expect actual
test_cmp expect actual
'
test_expect_success 'am regularly from file in subdirectory with full path' '
@ -66,7 +66,7 @@ test_expect_success 'am regularly from file in subdirectory with full path' '
@@ -66,7 +66,7 @@ test_expect_success 'am regularly from file in subdirectory with full path' '
@ -249,7 +249,7 @@ test_expect_success 'bundle should record HEAD correctly' '
@@ -249,7 +249,7 @@ test_expect_success 'bundle should record HEAD correctly' '
@ -31,7 +31,7 @@ test_expect_failure 'one is ancestor of others and should not be shown' '
@@ -31,7 +31,7 @@ test_expect_failure 'one is ancestor of others and should not be shown' '
@ -25,7 +25,7 @@ test_expect_success 'subtree available and works like recursive' '
@@ -25,7 +25,7 @@ test_expect_success 'subtree available and works like recursive' '
git merge -s subtree side &&
for i in mundo $s world; do echo $i; done >expect &&
@ -83,13 +83,13 @@ test_expect_success "checkout with unrelated dirty tree without -m" '
@@ -83,13 +83,13 @@ test_expect_success "checkout with unrelated dirty tree without -m" '
fill 0 1 2 3 4 5 6 7 8 >same &&
cp same kept
git checkout side >messages &&
diff -u same kept
test_cmp same kept
(cat > messages.expect <<EOF
M same
EOF
) &&
touch messages.expect &&
diff -u messages.expect messages
test_cmp messages.expect messages
'
test_expect_success "checkout -m with dirty tree" '
@ -178,7 +178,7 @@ If you want to create a new branch from this checkout, you may do so
@@ -178,7 +178,7 @@ If you want to create a new branch from this checkout, you may do so
@ -301,12 +301,12 @@ test_expect_success 'same tree (merge and amend merge)' '
@@ -301,12 +301,12 @@ test_expect_success 'same tree (merge and amend merge)' '
git merge -s ours side -m "empty ok" &&
git diff HEAD^ HEAD >actual &&
: >expected &&
diff -u expected actual &&
test_cmp expected actual &&
git commit --amend -m "empty really ok" &&
git diff HEAD^ HEAD >actual &&
: >expected &&
diff -u expected actual
test_cmp expected actual
'
@ -323,7 +323,7 @@ test_expect_success 'amend using the message from another commit' '
@@ -323,7 +323,7 @@ test_expect_success 'amend using the message from another commit' '
git commit --allow-empty --amend -C "$old" &&
git show --pretty="format:%ad %s" "$old" >expected &&
git show --pretty="format:%ad %s" HEAD >actual &&
diff -u expected actual
test_cmp expected actual
'
@ -341,7 +341,7 @@ test_expect_success 'amend using the message from a commit named with tag' '
@@ -341,7 +341,7 @@ test_expect_success 'amend using the message from a commit named with tag' '
git commit --allow-empty --amend -C tagged-old &&
git show --pretty="format:%ad %s" "$old" >expected &&
@ -257,8 +257,8 @@ test_expect_success '-w option should work with relative GIT_DIR' '
@@ -257,8 +257,8 @@ test_expect_success '-w option should work with relative GIT_DIR' '
@ -293,7 +293,7 @@ test_expect_success 'commit a file with leading spaces in the name' '
@@ -293,7 +293,7 @@ test_expect_success 'commit a file with leading spaces in the name' '