{"thread":{"id":"51410","subject":"[PATCH 0/1] t3420 remove progress from output","startedAt":"2019-07-01T13:12:42Z","lastAt":"2019-07-04T09:53:43Z","messageCount":8,"participants":["Phillip Wood via GitGitGadget","Junio C Hamano","Phillip Wood"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"378377","messageId":"pull.276.git.gitgitgadget@gmail.com","threadId":"51410","inReplyTo":null,"subject":"[PATCH 0/1] t3420 remove progress from output","fromName":"Phillip Wood via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-07-01T13:11:51Z","receivedAt":"2019-07-01T13:12:42Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Remove ugliness in the tests that check the output of git rebase\n\nBased-On: sg/rebase-progress Cc: SZEDER Gábor szeder.dev@gmail.com\n[szeder.dev@gmail.com]\n\nPhillip Wood (1):\n  t3420: remove progress lines before comparing output\n\n t/t3420-rebase-autostash.sh | 16 +++++++++-------\n 1 file changed, 9 insertions(+), 7 deletions(-)\n\n\nbase-commit: 5b12e3123b7b70e3875404a4ffe571ca079364fe\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-276%2Fphillipwood%2Fwip%2Ft3420-remove-progress-from-output-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-276/phillipwood/wip/t3420-remove-progress-from-output-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/276\n-- \ngitgitgadget\n"},{"id":"378378","messageId":"52501623f6b47447ce5da283ec11e378413899b7.1561986710.git.gitgitgadget@gmail.com","threadId":"51410","inReplyTo":"pull.276.git.gitgitgadget@gmail.com","subject":"[PATCH 1/1] t3420: remove progress lines before comparing output","fromName":"Phillip Wood via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-07-01T13:11:52Z","receivedAt":"2019-07-01T13:12:45Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nSome of the tests check the output of rebase is what we expect. These\nwere added after a regression that added unwanted stash output when\nusing --autostash. They are useful as they prevent unintended changes to\nthe output of the various rebase commands. However they also include all\nthe progress output which is less useful as it only tests what would be\nwritten to a dumb terminal which is not the normal use case. The recent\nchanges to fix clearing the line when printing progress necessarily\nmeant making an ugly change to these tests. Address this my removing the\nprogress output before comparing it to the expected output. We do this\nby removing everything before the final \"\\r\" on each line as we don't\ncare about the progress indicator, but we do care about what is printed\nimmediately after it.\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t3420-rebase-autostash.sh | 16 +++++++++-------\n 1 file changed, 9 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh\nindex 9186e90127..0454018584 100755\n--- a/t/t3420-rebase-autostash.sh\n+++ b/t/t3420-rebase-autostash.sh\n@@ -48,8 +48,8 @@ create_expected_success_interactive () {\n \tq_to_cr >expected <<-EOF\n \t$(grep \"^Created autostash: [0-9a-f][0-9a-f]*\\$\" actual)\n \tHEAD is now at $(git rev-parse --short feature-branch) third commit\n-\tRebasing (1/2)QRebasing (2/2)QApplied autostash.\n-\tQ                                                                                QSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n+\tApplied autostash.\n+\tSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n \tEOF\n }\n \n@@ -67,13 +67,13 @@ create_expected_failure_am () {\n }\n \n create_expected_failure_interactive () {\n-\tq_to_cr >expected <<-EOF\n+\tcat >expected <<-EOF\n \t$(grep \"^Created autostash: [0-9a-f][0-9a-f]*\\$\" actual)\n \tHEAD is now at $(git rev-parse --short feature-branch) third commit\n-\tRebasing (1/2)QRebasing (2/2)QApplying autostash resulted in conflicts.\n+\tApplying autostash resulted in conflicts.\n \tYour changes are safe in the stash.\n \tYou can run \"git stash pop\" or \"git stash drop\" at any time.\n-\tQ                                                                                QSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n+\tSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n \tEOF\n }\n \n@@ -109,7 +109,8 @@ testrebase () {\n \t\t\tsuffix=interactive\n \t\tfi &&\n \t\tcreate_expected_success_$suffix &&\n-\t\ttest_i18ncmp expected actual\n+\t\tsed \"$(printf \"s/.*\\\\r//\")\" <actual >actual2 &&\n+\t\ttest_i18ncmp expected actual2\n \t'\n \n \ttest_expect_success \"rebase$type: dirty index, non-conflicting rebase\" '\n@@ -209,7 +210,8 @@ testrebase () {\n \t\t\tsuffix=interactive\n \t\tfi &&\n \t\tcreate_expected_failure_$suffix &&\n-\t\ttest_i18ncmp expected actual\n+\t\tsed \"$(printf \"s/.*\\\\r//\")\" <actual >actual2 &&\n+\t\ttest_i18ncmp expected actual2\n \t'\n }\n \n-- \ngitgitgadget\n"},{"id":"378449","messageId":"xmqqimsl5v1u.fsf@gitster-ct.c.googlers.com","threadId":"51410","inReplyTo":"52501623f6b47447ce5da283ec11e378413899b7.1561986710.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/1] t3420: remove progress lines before comparing output","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-07-01T21:01:01Z","receivedAt":"2019-07-01T21:01:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Phillip Wood via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> progress output before comparing it to the expected output. We do this\n> by removing everything before the final \"\\r\" on each line as we don't\n> care about the progress indicator, but we do care about what is printed\n> immediately after it.\n\nAs long as sed implementation used here does not do anything funny\nto CR, I think the approach to strip everything before the last CR\non the line is sensible.  As I am not familiar with how Windows port\nof sed wants to treat a CR byte in the pattern, I am not sure about\nthe precondition of the above statement, though.\n\nI also have to wonder if we can/want to do this without an extra\nprintf process every time we sanitize the output, though I do not\nthink I care too deeply about it.\n\n> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n> ---\n>  t/t3420-rebase-autostash.sh | 16 +++++++++-------\n>  1 file changed, 9 insertions(+), 7 deletions(-)\n>\n> diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh\n> index 9186e90127..0454018584 100755\n> --- a/t/t3420-rebase-autostash.sh\n> +++ b/t/t3420-rebase-autostash.sh\n> @@ -48,8 +48,8 @@ create_expected_success_interactive () {\n>  \tq_to_cr >expected <<-EOF\n>  \t$(grep \"^Created autostash: [0-9a-f][0-9a-f]*\\$\" actual)\n>  \tHEAD is now at $(git rev-parse --short feature-branch) third commit\n> -\tRebasing (1/2)QRebasing (2/2)QApplied autostash.\n> -\tQ                                                                                QSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n> +\tApplied autostash.\n> +\tSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n>  \tEOF\n>  }\n>  \n> @@ -67,13 +67,13 @@ create_expected_failure_am () {\n>  }\n>  \n>  create_expected_failure_interactive () {\n> -\tq_to_cr >expected <<-EOF\n> +\tcat >expected <<-EOF\n>  \t$(grep \"^Created autostash: [0-9a-f][0-9a-f]*\\$\" actual)\n>  \tHEAD is now at $(git rev-parse --short feature-branch) third commit\n> -\tRebasing (1/2)QRebasing (2/2)QApplying autostash resulted in conflicts.\n> +\tApplying autostash resulted in conflicts.\n>  \tYour changes are safe in the stash.\n>  \tYou can run \"git stash pop\" or \"git stash drop\" at any time.\n> -\tQ                                                                                QSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n> +\tSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n>  \tEOF\n>  }\n>  \n> @@ -109,7 +109,8 @@ testrebase () {\n>  \t\t\tsuffix=interactive\n>  \t\tfi &&\n>  \t\tcreate_expected_success_$suffix &&\n> -\t\ttest_i18ncmp expected actual\n> +\t\tsed \"$(printf \"s/.*\\\\r//\")\" <actual >actual2 &&\n> +\t\ttest_i18ncmp expected actual2\n>  \t'\n>  \n>  \ttest_expect_success \"rebase$type: dirty index, non-conflicting rebase\" '\n> @@ -209,7 +210,8 @@ testrebase () {\n>  \t\t\tsuffix=interactive\n>  \t\tfi &&\n>  \t\tcreate_expected_failure_$suffix &&\n> -\t\ttest_i18ncmp expected actual\n> +\t\tsed \"$(printf \"s/.*\\\\r//\")\" <actual >actual2 &&\n> +\t\ttest_i18ncmp expected actual2\n>  \t'\n>  }\n"},{"id":"378500","messageId":"2a0a968e-6929-71eb-77cf-ec3ee28fd734@gmail.com","threadId":"51410","inReplyTo":"xmqqimsl5v1u.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 1/1] t3420: remove progress lines before comparing output","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2019-07-02T15:54:08Z","receivedAt":"2019-07-02T15:54:15Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 01/07/2019 22:01, Junio C Hamano wrote:\n> \"Phillip Wood via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n> \n>> progress output before comparing it to the expected output. We do this\n>> by removing everything before the final \"\\r\" on each line as we don't\n>> care about the progress indicator, but we do care about what is printed\n>> immediately after it.\n> \n> As long as sed implementation used here does not do anything funny\n> to CR, I think the approach to strip everything before the last CR\n> on the line is sensible.  As I am not familiar with how Windows port\n> of sed wants to treat a CR byte in the pattern, I am not sure about\n> the precondition of the above statement, though.\n\nI wondered about that too, but it passes the CI tests under windows.\n\n> I also have to wonder if we can/want to do this without an extra\n> printf process every time we sanitize the output, though I do not\n> think I care too deeply about it.\n\nI could add 're=\"$(printf ...)\"' to the setup at the top of the file if \nyou want\n\nBest Wishes\n\nPhillip\n\n>> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n>> ---\n>>   t/t3420-rebase-autostash.sh | 16 +++++++++-------\n>>   1 file changed, 9 insertions(+), 7 deletions(-)\n>>\n>> diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh\n>> index 9186e90127..0454018584 100755\n>> --- a/t/t3420-rebase-autostash.sh\n>> +++ b/t/t3420-rebase-autostash.sh\n>> @@ -48,8 +48,8 @@ create_expected_success_interactive () {\n>>   \tq_to_cr >expected <<-EOF\n>>   \t$(grep \"^Created autostash: [0-9a-f][0-9a-f]*\\$\" actual)\n>>   \tHEAD is now at $(git rev-parse --short feature-branch) third commit\n>> -\tRebasing (1/2)QRebasing (2/2)QApplied autostash.\n>> -\tQ                                                                                QSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n>> +\tApplied autostash.\n>> +\tSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n>>   \tEOF\n>>   }\n>>   \n>> @@ -67,13 +67,13 @@ create_expected_failure_am () {\n>>   }\n>>   \n>>   create_expected_failure_interactive () {\n>> -\tq_to_cr >expected <<-EOF\n>> +\tcat >expected <<-EOF\n>>   \t$(grep \"^Created autostash: [0-9a-f][0-9a-f]*\\$\" actual)\n>>   \tHEAD is now at $(git rev-parse --short feature-branch) third commit\n>> -\tRebasing (1/2)QRebasing (2/2)QApplying autostash resulted in conflicts.\n>> +\tApplying autostash resulted in conflicts.\n>>   \tYour changes are safe in the stash.\n>>   \tYou can run \"git stash pop\" or \"git stash drop\" at any time.\n>> -\tQ                                                                                QSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n>> +\tSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n>>   \tEOF\n>>   }\n>>   \n>> @@ -109,7 +109,8 @@ testrebase () {\n>>   \t\t\tsuffix=interactive\n>>   \t\tfi &&\n>>   \t\tcreate_expected_success_$suffix &&\n>> -\t\ttest_i18ncmp expected actual\n>> +\t\tsed \"$(printf \"s/.*\\\\r//\")\" <actual >actual2 &&\n>> +\t\ttest_i18ncmp expected actual2\n>>   \t'\n>>   \n>>   \ttest_expect_success \"rebase$type: dirty index, non-conflicting rebase\" '\n>> @@ -209,7 +210,8 @@ testrebase () {\n>>   \t\t\tsuffix=interactive\n>>   \t\tfi &&\n>>   \t\tcreate_expected_failure_$suffix &&\n>> -\t\ttest_i18ncmp expected actual\n>> +\t\tsed \"$(printf \"s/.*\\\\r//\")\" <actual >actual2 &&\n>> +\t\ttest_i18ncmp expected actual2\n>>   \t'\n>>   }\n"},{"id":"378504","messageId":"xmqqmuhw4afu.fsf@gitster-ct.c.googlers.com","threadId":"51410","inReplyTo":"2a0a968e-6929-71eb-77cf-ec3ee28fd734@gmail.com","subject":"Re: [PATCH 1/1] t3420: remove progress lines before comparing output","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-07-02T17:23:49Z","receivedAt":"2019-07-02T17:23:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n>> As long as sed implementation used here does not do anything funny\n>> to CR, I think the approach to strip everything before the last CR\n>> on the line is sensible.  As I am not familiar with how Windows port\n>> of sed wants to treat a CR byte in the pattern, I am not sure about\n>> the precondition of the above statement, though.\n>\n> I wondered about that too, but it passes the CI tests under windows.\n\nHopefully Git for Windows, MinGW, and CygWin would all behave\nsimilarly.\n\n>> I also have to wonder if we can/want to do this without an extra\n>> printf process every time we sanitize the output, though I do not\n>> think I care too deeply about it.\n>\n> I could add 're=\"$(printf ...)\"' to the setup at the top of the file\n> if you want\n\nAs I do not care too deeply about it, we recently saw a lot about\nreducing number of processes in the tests, so apparently some folks\ncare and I presume they want to see something like that to happen.\nI do not think $re is a good name for such a variable, though ;-)\n"},{"id":"378589","messageId":"pull.276.v2.git.gitgitgadget@gmail.com","threadId":"51410","inReplyTo":"pull.276.git.gitgitgadget@gmail.com","subject":"[PATCH v2 0/1] t3420 remove progress from output","fromName":"Phillip Wood via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-07-04T09:47:01Z","receivedAt":"2019-07-04T09:47:04Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Remove ugliness in the tests that check the output of git rebase\n\nI've updated this to avoid repeated calls to printf as suggested by Junio\n\nBased-On: sg/rebase-progress\n\nPhillip Wood (1):\n  t3420: remove progress lines before comparing output\n\n t/t3420-rebase-autostash.sh | 19 +++++++++++--------\n 1 file changed, 11 insertions(+), 8 deletions(-)\n\n\nbase-commit: 5b12e3123b7b70e3875404a4ffe571ca079364fe\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-276%2Fphillipwood%2Fwip%2Ft3420-remove-progress-from-output-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-276/phillipwood/wip/t3420-remove-progress-from-output-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/276\n\nRange-diff vs v1:\n\n 1:  52501623f6 ! 1:  e1b4023bc0 t3420: remove progress lines before comparing output\n     @@ -20,6 +20,16 @@\n       diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh\n       --- a/t/t3420-rebase-autostash.sh\n       +++ b/t/t3420-rebase-autostash.sh\n     +@@\n     + \techo conflicting-change >file2 &&\n     + \tgit add . &&\n     + \ttest_tick &&\n     +-\tgit commit -m \"related commit\"\n     ++\tgit commit -m \"related commit\" &&\n     ++\tremove_progress_re=\"$(printf \"s/.*\\\\r//\")\"\n     + '\n     + \n     + create_expected_success_am () {\n      @@\n       \tq_to_cr >expected <<-EOF\n       \t$(grep \"^Created autostash: [0-9a-f][0-9a-f]*\\$\" actual)\n     @@ -53,7 +63,7 @@\n       \t\tfi &&\n       \t\tcreate_expected_success_$suffix &&\n      -\t\ttest_i18ncmp expected actual\n     -+\t\tsed \"$(printf \"s/.*\\\\r//\")\" <actual >actual2 &&\n     ++\t\tsed \"$remove_progress_re\" <actual >actual2 &&\n      +\t\ttest_i18ncmp expected actual2\n       \t'\n       \n     @@ -63,7 +73,7 @@\n       \t\tfi &&\n       \t\tcreate_expected_failure_$suffix &&\n      -\t\ttest_i18ncmp expected actual\n     -+\t\tsed \"$(printf \"s/.*\\\\r//\")\" <actual >actual2 &&\n     ++\t\tsed \"$remove_progress_re\" <actual >actual2 &&\n      +\t\ttest_i18ncmp expected actual2\n       \t'\n       }\n\n-- \ngitgitgadget\n"},{"id":"378590","messageId":"e1b4023bc0e606079547f7a7562a283009e69530.1562233620.git.gitgitgadget@gmail.com","threadId":"51410","inReplyTo":"pull.276.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 1/1] t3420: remove progress lines before comparing output","fromName":"Phillip Wood via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-07-04T09:47:02Z","receivedAt":"2019-07-04T09:47:06Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nSome of the tests check the output of rebase is what we expect. These\nwere added after a regression that added unwanted stash output when\nusing --autostash. They are useful as they prevent unintended changes to\nthe output of the various rebase commands. However they also include all\nthe progress output which is less useful as it only tests what would be\nwritten to a dumb terminal which is not the normal use case. The recent\nchanges to fix clearing the line when printing progress necessarily\nmeant making an ugly change to these tests. Address this my removing the\nprogress output before comparing it to the expected output. We do this\nby removing everything before the final \"\\r\" on each line as we don't\ncare about the progress indicator, but we do care about what is printed\nimmediately after it.\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t3420-rebase-autostash.sh | 19 +++++++++++--------\n 1 file changed, 11 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh\nindex 9186e90127..b8f4d03467 100755\n--- a/t/t3420-rebase-autostash.sh\n+++ b/t/t3420-rebase-autostash.sh\n@@ -30,7 +30,8 @@ test_expect_success setup '\n \techo conflicting-change >file2 &&\n \tgit add . &&\n \ttest_tick &&\n-\tgit commit -m \"related commit\"\n+\tgit commit -m \"related commit\" &&\n+\tremove_progress_re=\"$(printf \"s/.*\\\\r//\")\"\n '\n \n create_expected_success_am () {\n@@ -48,8 +49,8 @@ create_expected_success_interactive () {\n \tq_to_cr >expected <<-EOF\n \t$(grep \"^Created autostash: [0-9a-f][0-9a-f]*\\$\" actual)\n \tHEAD is now at $(git rev-parse --short feature-branch) third commit\n-\tRebasing (1/2)QRebasing (2/2)QApplied autostash.\n-\tQ                                                                                QSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n+\tApplied autostash.\n+\tSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n \tEOF\n }\n \n@@ -67,13 +68,13 @@ create_expected_failure_am () {\n }\n \n create_expected_failure_interactive () {\n-\tq_to_cr >expected <<-EOF\n+\tcat >expected <<-EOF\n \t$(grep \"^Created autostash: [0-9a-f][0-9a-f]*\\$\" actual)\n \tHEAD is now at $(git rev-parse --short feature-branch) third commit\n-\tRebasing (1/2)QRebasing (2/2)QApplying autostash resulted in conflicts.\n+\tApplying autostash resulted in conflicts.\n \tYour changes are safe in the stash.\n \tYou can run \"git stash pop\" or \"git stash drop\" at any time.\n-\tQ                                                                                QSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n+\tSuccessfully rebased and updated refs/heads/rebased-feature-branch.\n \tEOF\n }\n \n@@ -109,7 +110,8 @@ testrebase () {\n \t\t\tsuffix=interactive\n \t\tfi &&\n \t\tcreate_expected_success_$suffix &&\n-\t\ttest_i18ncmp expected actual\n+\t\tsed \"$remove_progress_re\" <actual >actual2 &&\n+\t\ttest_i18ncmp expected actual2\n \t'\n \n \ttest_expect_success \"rebase$type: dirty index, non-conflicting rebase\" '\n@@ -209,7 +211,8 @@ testrebase () {\n \t\t\tsuffix=interactive\n \t\tfi &&\n \t\tcreate_expected_failure_$suffix &&\n-\t\ttest_i18ncmp expected actual\n+\t\tsed \"$remove_progress_re\" <actual >actual2 &&\n+\t\ttest_i18ncmp expected actual2\n \t'\n }\n \n-- \ngitgitgadget\n"},{"id":"378591","messageId":"b7cdf6af-061f-6578-384f-e378b712eea6@gmail.com","threadId":"51410","inReplyTo":"xmqqmuhw4afu.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 1/1] t3420: remove progress lines before comparing output","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2019-07-04T09:53:40Z","receivedAt":"2019-07-04T09:53:43Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 02/07/2019 18:23, Junio C Hamano wrote:\n> Phillip Wood <phillip.wood123@gmail.com> writes:\n> \n>>> As long as sed implementation used here does not do anything funny\n>>> to CR, I think the approach to strip everything before the last CR\n>>> on the line is sensible.  As I am not familiar with how Windows port\n>>> of sed wants to treat a CR byte in the pattern, I am not sure about\n>>> the precondition of the above statement, though.\n>>\n>> I wondered about that too, but it passes the CI tests under windows.\n> \n> Hopefully Git for Windows, MinGW, and CygWin would all behave\n> similarly.\n> \n>>> I also have to wonder if we can/want to do this without an extra\n>>> printf process every time we sanitize the output, though I do not\n>>> think I care too deeply about it.\n>>\n>> I could add 're=\"$(printf ...)\"' to the setup at the top of the file\n>> if you want\n> \n> As I do not care too deeply about it, we recently saw a lot about\n> reducing number of processes in the tests, so apparently some folks\n> care and I presume they want to see something like that to happen.\n> I do not think $re is a good name for such a variable, though ;-)\n\nYes, $re was just a place holder - naming is hard ...\n\nBest Wishes\n\nPhillip\n\n"}]}