test: avoid pipes in git related commands for test
Avoid using pipes downstream of Git commands since the exit codes
of commands upstream of pipes get swallowed, thus potentially
hiding failure of those commands. Instead, capture Git command
output to a file and apply the downstream command(s) to that file.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test -z "$(git config --get svn-remote.svn.fetch \
"^trunk:refs/remotes/thunk@2$")"
'
@ -48,8 +48,8 @@ test_expect_success 'init and fetch from one svn-remote' '
@@ -48,8 +48,8 @@ test_expect_success 'init and fetch from one svn-remote' '
git svn fetch -i svn/thunk &&
test "$(git rev-parse --verify refs/remotes/svn/trunk)" \
grep "^author AAAAAAA AAAAAAA <aa@example\.com> " actual
)
'
@ -43,11 +44,12 @@ test_expect_success 'continues to import once authors have been added' '
@@ -43,11 +44,12 @@ test_expect_success 'continues to import once authors have been added' '
(
cd x
git svn fetch --authors-file=../svn-authors &&
test "$(git rev-list refs/remotes/git-svn | wc -l)" -eq 4 &&
@ -186,14 +190,16 @@ test_expect_success 'test globbing in the middle of the word' '
@@ -186,14 +190,16 @@ test_expect_success 'test globbing in the middle of the word' '
svn_cmd up
) &&
git svn fetch five &&
test $(git rev-list refs/remotes/five/branches/abcde | wc -l) -eq 2 &&
test $(git rev-list refs/remotes/five/tags/fghij | wc -l) -eq 3 &&
@ -367,12 +362,14 @@ test_expect_success 'path limiting with import-marks does not lose unmodified fi
@@ -367,12 +362,14 @@ test_expect_success 'path limiting with import-marks does not lose unmodified fi
test_expect_success 'set-up a few more tags for tag export tests' '
@ -505,8 +502,8 @@ test_expect_success 'refs are updated even if no commits need to be exported' '
@@ -505,8 +502,8 @@ test_expect_success 'refs are updated even if no commits need to be exported' '
@ -534,7 +531,8 @@ test_expect_success 'when using -C, do not declare copy when source of copy is a
@@ -534,7 +531,8 @@ test_expect_success 'when using -C, do not declare copy when source of copy is a