* [PATCH] rebase -i: Add missing newline to end of message
@ 2017-05-18 13:41 Phillip Wood
2017-05-18 13:48 ` Ævar Arnfjörð Bjarmason
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Phillip Wood @ 2017-05-18 13:41 UTC (permalink / raw)
To: git; +Cc: Johannes.Schindelin, Phillip Wood
From: Phillip Wood <phillip.wood@dunelm.org.uk>
The message that's printed when auto-stashed changes are successfully
restored was missing '\n' at the end.
---
sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sequencer.c b/sequencer.c
index 311728a14..4dcf9c8be 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1920,7 +1920,7 @@ static int apply_autostash(struct replay_opts *opts)
argv_array_push(&child.args, "apply");
argv_array_push(&child.args, stash_sha1.buf);
if (!run_command(&child))
- printf(_("Applied autostash."));
+ printf(_("Applied autostash.\n"));
else {
struct child_process store = CHILD_PROCESS_INIT;
--
2.13.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] rebase -i: Add missing newline to end of message
2017-05-18 13:41 [PATCH] rebase -i: Add missing newline to end of message Phillip Wood
@ 2017-05-18 13:48 ` Ævar Arnfjörð Bjarmason
2017-05-18 14:53 ` Phillip Wood
2017-05-18 21:21 ` Johannes Schindelin
2017-05-19 14:32 ` [PATCH v2] " phillip.wood
2 siblings, 1 reply; 8+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2017-05-18 13:48 UTC (permalink / raw)
To: Phillip Wood; +Cc: Git Mailing List, Johannes Schindelin
On Thu, May 18, 2017 at 3:41 PM, Phillip Wood <phillip.wood@talktalk.net> wrote:
> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> The message that's printed when auto-stashed changes are successfully
> restored was missing '\n' at the end.
Both this and your reflog message really seem like the sort of tricky
edge cases we should have tests for.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rebase -i: Add missing newline to end of message
2017-05-18 13:48 ` Ævar Arnfjörð Bjarmason
@ 2017-05-18 14:53 ` Phillip Wood
0 siblings, 0 replies; 8+ messages in thread
From: Phillip Wood @ 2017-05-18 14:53 UTC (permalink / raw)
To: Ævar Arnfjörð Bjarmason; +Cc: git, Johannes Schindelin
On 18/05/17 14:48, Ævar Arnfjörð Bjarmason wrote:
> On Thu, May 18, 2017 at 3:41 PM, Phillip Wood <phillip.wood@talktalk.net> wrote:
>> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>>
>> The message that's printed when auto-stashed changes are successfully
>> restored was missing '\n' at the end.
>
> Both this and your reflog message really seem like the sort of tricky
> edge cases we should have tests for.
>
Yes I agree, I'll try and put something together when I have time
Best Wishes
Phillip
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rebase -i: Add missing newline to end of message
2017-05-18 13:41 [PATCH] rebase -i: Add missing newline to end of message Phillip Wood
2017-05-18 13:48 ` Ævar Arnfjörð Bjarmason
@ 2017-05-18 21:21 ` Johannes Schindelin
2017-05-19 10:13 ` Phillip Wood
2017-05-19 14:32 ` [PATCH v2] " phillip.wood
2 siblings, 1 reply; 8+ messages in thread
From: Johannes Schindelin @ 2017-05-18 21:21 UTC (permalink / raw)
To: Phillip Wood; +Cc: git
Hi Phillip,
On Thu, 18 May 2017, Phillip Wood wrote:
> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> The message that's printed when auto-stashed changes are successfully
> restored was missing '\n' at the end.
> ---
Please add your Signed-off-by:, and my Acked-by:
Thanks,
Johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rebase -i: Add missing newline to end of message
2017-05-18 21:21 ` Johannes Schindelin
@ 2017-05-19 10:13 ` Phillip Wood
2017-05-19 11:24 ` Ævar Arnfjörð Bjarmason
0 siblings, 1 reply; 8+ messages in thread
From: Phillip Wood @ 2017-05-19 10:13 UTC (permalink / raw)
To: Johannes Schindelin, Phillip Wood; +Cc: git
On 18/05/17 22:21, Johannes Schindelin wrote:
> Hi Phillip,
>
> On Thu, 18 May 2017, Phillip Wood wrote:
>
>> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>>
>> The message that's printed when auto-stashed changes are successfully
>> restored was missing '\n' at the end.
>> ---
>
> Please add your Signed-off-by:, and my Acked-by:
Will do (I forgot to add --signoff to git commit). Do I need to resend
the other patches with your Acked-by: or will that happen when Junio
applies them?
I was thinking about this last night and wonder if it would be better to do
- printf(_("Applied autostash."));
+ printf("%s\n", _("Applied autostash."));
rather than
- printf(_("Applied autostash."));
+ printf(_("Applied autostash.\n"));
as it would avoid changing the translated string and also mean that the
newline couldn't be accidentally removed any typos in the translation.
Best Wishes
Phillip
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rebase -i: Add missing newline to end of message
2017-05-19 10:13 ` Phillip Wood
@ 2017-05-19 11:24 ` Ævar Arnfjörð Bjarmason
2017-05-19 14:35 ` Phillip Wood
0 siblings, 1 reply; 8+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2017-05-19 11:24 UTC (permalink / raw)
To: Phillip Wood; +Cc: Johannes Schindelin, Git Mailing List
On Fri, May 19, 2017 at 12:13 PM, Phillip Wood
<phillip.wood@talktalk.net> wrote:
> On 18/05/17 22:21, Johannes Schindelin wrote:
>> Hi Phillip,
>>
>> On Thu, 18 May 2017, Phillip Wood wrote:
>>
>>> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>>>
>>> The message that's printed when auto-stashed changes are successfully
>>> restored was missing '\n' at the end.
>>> ---
>>
>> Please add your Signed-off-by:, and my Acked-by:
>
> Will do (I forgot to add --signoff to git commit). Do I need to resend
> the other patches with your Acked-by: or will that happen when Junio
> applies them?
>
> I was thinking about this last night and wonder if it would be better to do
>
> - printf(_("Applied autostash."));
> + printf("%s\n", _("Applied autostash."));
>
> rather than
>
> - printf(_("Applied autostash."));
> + printf(_("Applied autostash.\n"));
>
> as it would avoid changing the translated string and also mean that the
> newline couldn't be accidentally removed any typos in the translation.
>
> Best Wishes
>
> Phillip
Just having the \n in the message is fine. Stuff like this is already
checked for as part of the build process by msgfmt, e.g.:
$ git diff -U0
diff --git a/po/de.po b/po/de.po
index 679f8f4720..b9a7d417ac 100644
--- a/po/de.po
+++ b/po/de.po
@@ -23 +23 @@ msgid "hint: %.*s\n"
-msgstr "Hinweis: %.*s\n"
+msgstr "Hinweis: %.*s"
Errors with:
po/de.po:23: 'msgid' and 'msgstr' entries do not both end with '\n'
And if you change the format specifier:
po/de.po:23: number of format specifications in 'msgid' and
'msgstr' does not match
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] rebase -i: Add missing newline to end of message
2017-05-18 13:41 [PATCH] rebase -i: Add missing newline to end of message Phillip Wood
2017-05-18 13:48 ` Ævar Arnfjörð Bjarmason
2017-05-18 21:21 ` Johannes Schindelin
@ 2017-05-19 14:32 ` phillip.wood
2 siblings, 0 replies; 8+ messages in thread
From: phillip.wood @ 2017-05-19 14:32 UTC (permalink / raw)
To: git; +Cc: avarab, Johannes.Schindelin, Phillip Wood
From: Phillip Wood <phillip.wood@dunelm.org.uk>
The message that's printed when auto-stashed changes are successfully
restored was missing '\n' at the end.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
I've added signed-off-by and acked-by lines to the commit message,
otherwise this is unchanged
sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sequencer.c b/sequencer.c
index 311728a145dfc66e230334221a2610468239932d..4dcf9c8be044247c6c18a4ec2a4675d9df9953eb 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1920,7 +1920,7 @@ static int apply_autostash(struct replay_opts *opts)
argv_array_push(&child.args, "apply");
argv_array_push(&child.args, stash_sha1.buf);
if (!run_command(&child))
- printf(_("Applied autostash."));
+ printf(_("Applied autostash.\n"));
else {
struct child_process store = CHILD_PROCESS_INIT;
--
2.13.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] rebase -i: Add missing newline to end of message
2017-05-19 11:24 ` Ævar Arnfjörð Bjarmason
@ 2017-05-19 14:35 ` Phillip Wood
0 siblings, 0 replies; 8+ messages in thread
From: Phillip Wood @ 2017-05-19 14:35 UTC (permalink / raw)
To: Ævar Arnfjörð Bjarmason, Phillip Wood
Cc: Johannes Schindelin, Git Mailing List
On 19/05/17 12:24, Ævar Arnfjörð Bjarmason wrote:
> On Fri, May 19, 2017 at 12:13 PM, Phillip Wood
> <phillip.wood@talktalk.net> wrote:
>> On 18/05/17 22:21, Johannes Schindelin wrote:
>>> Hi Phillip,
>>>
>>> On Thu, 18 May 2017, Phillip Wood wrote:
>>>
>>>> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>>>>
>>>> The message that's printed when auto-stashed changes are successfully
>>>> restored was missing '\n' at the end.
>>>> ---
>>>
>>> Please add your Signed-off-by:, and my Acked-by:
>>
>> Will do (I forgot to add --signoff to git commit). Do I need to resend
>> the other patches with your Acked-by: or will that happen when Junio
>> applies them?
>>
>> I was thinking about this last night and wonder if it would be better to do
>>
>> - printf(_("Applied autostash."));
>> + printf("%s\n", _("Applied autostash."));
>>
>> rather than
>>
>> - printf(_("Applied autostash."));
>> + printf(_("Applied autostash.\n"));
>>
>> as it would avoid changing the translated string and also mean that the
>> newline couldn't be accidentally removed any typos in the translation.
>>
>> Best Wishes
>>
>> Phillip
>
> Just having the \n in the message is fine. Stuff like this is already
> checked for as part of the build process by msgfmt, e.g.:
>
> $ git diff -U0
> diff --git a/po/de.po b/po/de.po
> index 679f8f4720..b9a7d417ac 100644
> --- a/po/de.po
> +++ b/po/de.po
> @@ -23 +23 @@ msgid "hint: %.*s\n"
> -msgstr "Hinweis: %.*s\n"
> +msgstr "Hinweis: %.*s"
>
> Errors with:
>
> po/de.po:23: 'msgid' and 'msgstr' entries do not both end with '\n'
>
> And if you change the format specifier:
>
> po/de.po:23: number of format specifications in 'msgid' and
> 'msgstr' does not match
>
Hi Ævar
Thanks for clarifying that, I've left the patch unchanged
Thanks again
Phillip
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-05-19 14:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-18 13:41 [PATCH] rebase -i: Add missing newline to end of message Phillip Wood
2017-05-18 13:48 ` Ævar Arnfjörð Bjarmason
2017-05-18 14:53 ` Phillip Wood
2017-05-18 21:21 ` Johannes Schindelin
2017-05-19 10:13 ` Phillip Wood
2017-05-19 11:24 ` Ævar Arnfjörð Bjarmason
2017-05-19 14:35 ` Phillip Wood
2017-05-19 14:32 ` [PATCH v2] " phillip.wood
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).