mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
t4023: fix ignored exit codes of git
Change a "git diff-tree" command to be &&-chained so that we won't ignore its exit code, see theea05fd5fbf
(Merge branch 'ab/keep-git-exit-codes-in-tests', 2022-03-16) topic for prior art. This fixes code added inb45563a229
(rename: Break filepairs with different types., 2007-11-30). Due to hiding the exit code we hid a memory leak under SANITIZE=leak. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
e7e5c6f715
commit
5f3bfdc4f3
1 changed files with 6 additions and 6 deletions
|
@ -52,8 +52,8 @@ test_expect_success setup '
|
|||
'
|
||||
|
||||
test_expect_success 'cross renames to be detected for regular files' '
|
||||
|
||||
git diff-tree five six -r --name-status -B -M | sort >actual &&
|
||||
git diff-tree five six -r --name-status -B -M >out &&
|
||||
sort out >actual &&
|
||||
{
|
||||
echo "R100 foo bar" &&
|
||||
echo "R100 bar foo"
|
||||
|
@ -63,8 +63,8 @@ test_expect_success 'cross renames to be detected for regular files' '
|
|||
'
|
||||
|
||||
test_expect_success 'cross renames to be detected for typechange' '
|
||||
|
||||
git diff-tree one two -r --name-status -B -M | sort >actual &&
|
||||
git diff-tree one two -r --name-status -B -M >out &&
|
||||
sort out >actual &&
|
||||
{
|
||||
echo "R100 foo bar" &&
|
||||
echo "R100 bar foo"
|
||||
|
@ -74,8 +74,8 @@ test_expect_success 'cross renames to be detected for typechange' '
|
|||
'
|
||||
|
||||
test_expect_success 'moves and renames' '
|
||||
|
||||
git diff-tree three four -r --name-status -B -M | sort >actual &&
|
||||
git diff-tree three four -r --name-status -B -M >out &&
|
||||
sort out >actual &&
|
||||
{
|
||||
# see -B -M (#6) in t4008
|
||||
echo "C100 foo bar" &&
|
||||
|
|
Loading…
Reference in a new issue