Skip to content

Commit 0d14398

Browse files
committed
Merge branch 'sk/t7614-do-not-hide-git-exit-status' into next
The test script 't/t7614-merge-signoff.sh' has been updated to avoid suppressing the exit code of 'git' commands in a pipe. * sk/t7614-do-not-hide-git-exit-status: t7614: avoid hiding git's exit code in a pipe
2 parents 621ca4c + b6b2769 commit 0d14398

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

t/t7614-merge-signoff.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ test_expect_success 'git merge --signoff adds a sign-off line' '
4545
test_commit main-branch-2 file2 2 &&
4646
git checkout other-branch &&
4747
git merge main --signoff --no-edit &&
48-
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
48+
git cat-file commit HEAD >commit &&
49+
sed -e "1,/^\$/d" commit >actual &&
4950
test_cmp expected-signed actual
5051
'
5152

@@ -55,7 +56,8 @@ test_expect_success 'git merge does not add a sign-off line' '
5556
test_commit main-branch-3 file3 3 &&
5657
git checkout other-branch &&
5758
git merge main --no-edit &&
58-
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
59+
git cat-file commit HEAD >commit &&
60+
sed -e "1,/^\$/d" commit >actual &&
5961
test_cmp expected-unsigned actual
6062
'
6163

@@ -65,7 +67,8 @@ test_expect_success 'git merge --no-signoff flag cancels --signoff flag' '
6567
test_commit main-branch-4 file4 4 &&
6668
git checkout other-branch &&
6769
git merge main --no-edit --signoff --no-signoff &&
68-
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
70+
git cat-file commit HEAD >commit &&
71+
sed -e "1,/^\$/d" commit >actual &&
6972
test_cmp expected-unsigned actual
7073
'
7174

0 commit comments

Comments
 (0)