t4014: Replace sed's non-standard 'Q' by standard 'q'
PATCH 1/1 t4014: Replace sed's non-standard 'Q' by standard 'q'
This commit should be applied on top of db/cover-letter.
-- >8 --
This commit avoids sed's 'Q' operator. The Open Group's sed man page [1] does not mention 'Q'. sed on Mac OS X 10.4 does not accept Q. 'q' is sufficient for our purpose.
[1] http://opengroup.org/onlinepubs/007908799/xcu/sed.html
--- t/t4014-format-patch.sh | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
t/t4014-format-patch.sh +4 -4
@@ -95,7 +95,7 @@ test_expect_success 'extra headers' ' git config --add format.headers "Cc: S. E. Cipient <[email protected]> " && git format-patch --stdout master..side > patch2 && - sed -e "/^$/Q" patch2 > hdrs2 && + sed -e "/^$/q" patch2 > hdrs2 && grep "^To: R. E. Cipient <[email protected]>$" hdrs2 && grep "^Cc: S. E. Cipient <[email protected]>$" hdrs2
@@ -106,7 +106,7 @@ test_expect_success 'extra headers without newlines' ' git config --replace-all format.headers "To: R. E. Cipient <[email protected]>" && git config --add format.headers "Cc: S. E. Cipient <[email protected]>" && git format-patch --stdout master..side >patch3 && - sed -e "/^$/Q" patch3 > hdrs3 && + sed -e "/^$/q" patch3 > hdrs3 && grep "^To: R. E. Cipient <[email protected]>$" hdrs3 && grep "^Cc: S. E. Cipient <[email protected]>$" hdrs3
@@ -117,7 +117,7 @@ test_expect_success 'extra headers with multiple To:s' ' git config --replace-all format.headers "To: R. E. Cipient <[email protected]>" && git config --add format.headers "To: S. E. Cipient <[email protected]>" && git format-patch --stdout master..side > patch4 && - sed -e "/^$/Q" patch4 > hdrs4 && + sed -e "/^$/q" patch4 > hdrs4 && grep "^To: R. E. Cipient <[email protected]>,$" hdrs4 && grep "^ *S. E. Cipient <[email protected]>$" hdrs4 '
@@ -125,7 +125,7 @@ test_expect_success 'extra headers with multiple To:s' ' test_expect_success 'additional command line cc' ' git config --replace-all format.headers "Cc: R. E. Cipient <[email protected]>" && - git format-patch --cc="S. E. Cipient <[email protected]>" --stdout master..side | sed -e "/^$/Q" >patch5 && + git format-patch --cc="S. E. Cipient <[email protected]>" --stdout master..side | sed -e "/^$/q" >patch5 && grep "^Cc: R. E. Cipient <[email protected]>,$" patch5 && grep "^ *S. E. Cipient <[email protected]>$" patch5 '
Signature · 1 line
1.5.4.2.199.gb454ad
Quoted 7 lines · Steffen Prohaska
This commit should be applied on top of db/cover-letter.
-- >8 --
This commit avoids sed's 'Q' operator. The Open Group's sed man page [1] does not mention 'Q'. sed on Mac OS X 10.4 does not accept Q. 'q' is sufficient for our purpose.
Thanks.
t/t4014-format-patch.sh test_expect_success 'extra headers' ' · line 101
Quoted 13 lines
t/t4014-format-patch.sh +1
-1@@ -95,7 +95,7 @@ test_expect_success 'extra headers' ' git config --add format.headers "Cc: S. E. Cipient <[email protected]> " && git format-patch --stdout master..side > patch2 && - sed -e "/^$/Q" patch2 > hdrs2 && + sed -e "/^$/q" patch2 > hdrs2 && grep "^To: R. E. Cipient <[email protected]>$" hdrs2 && grep "^Cc: S. E. Cipient <[email protected]>$" hdrs2
I usually try to be pretty careful about these kind of things, but these somehow slipped in. Changing them to 'q' means the output will now have an additional blank line at the end, but that would not affect the result the later tests inspect, so it's a good change.
Quoted 9 lines · Steffen Prohaska
This commit should be applied on top of db/cover-letter.
-- >8 --
This commit avoids sed's 'Q' operator. The Open Group's sed man page [1] does not mention 'Q'. sed on Mac OS X 10.4 does not accept Q. 'q' is sufficient for our purpose.
Looks good to me; GNU man pages annoyingly don't tell you what's not more standard.
-Daniel
*This .sig left intentionally blank*
Quoted 6 lines · Daniel Barkalow
Quoted 4 lines · Steffen Prohaska
This commit should be applied on top of db/cover-letter.
-- >8 --
Quoted 8 lines
Quoted 5 lines
This commit avoids sed's 'Q' operator. The Open Group's sed man page [1] does not mention 'Q'. sed on Mac OS X 10.4 does not accept Q. 'q' is sufficient for our purpose.
Looks good to me; GNU man pages annoyingly don't tell you what's not more standard.
Probably. You have to be an old git ;-)