diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
commit | 037de004c68d704abf839eebe075c58c9603f8f3 (patch) | |
tree | 7ac13a7fbb70193e7d04fc193f75de839e914d45 /t/t3920-crlf-messages.sh | |
parent | Adding upstream version 1:2.43.0. (diff) | |
download | git-20ec40b9dc901952c46c323faf090fc8e31a66a4.tar.xz git-20ec40b9dc901952c46c323faf090fc8e31a66a4.zip |
Adding upstream version 1:2.45.1.upstream/1%2.45.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/t3920-crlf-messages.sh')
-rwxr-xr-x | t/t3920-crlf-messages.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t3920-crlf-messages.sh b/t/t3920-crlf-messages.sh index 67fd234..50ae222 100755 --- a/t/t3920-crlf-messages.sh +++ b/t/t3920-crlf-messages.sh @@ -10,7 +10,7 @@ LIB_CRLF_BRANCHES="" create_crlf_ref () { branch="$1" && cat >.crlf-orig-$branch.txt && - cat .crlf-orig-$branch.txt | append_cr >.crlf-message-$branch.txt && + append_cr <.crlf-orig-$branch.txt >.crlf-message-$branch.txt && grep 'Subject' .crlf-orig-$branch.txt | tr '\n' ' ' | sed 's/[ ]*$//' | tr -d '\n' >.crlf-subject-$branch.txt && grep 'Body' .crlf-orig-$branch.txt | append_cr >.crlf-body-$branch.txt && LIB_CRLF_BRANCHES="${LIB_CRLF_BRANCHES} ${branch}" && @@ -97,7 +97,7 @@ test_expect_success 'branch: --verbose works with messages using CRLF' ' git branch -v >tmp && # Remove first two columns, and the line for the currently checked out branch current=$(git branch --show-current) && - grep -v $current <tmp | awk "{\$1=\$2=\"\"}1" >actual && + awk "/$current/ { next } { \$1 = \$2 = \"\" } 1" <tmp >actual && test_cmp expect actual ' |