Skip to contentSkip to conversation

rebase: make warning less passive aggressive

PATCH Superseded Harmen Stoppels via GitGitGadget 6 participants 18 messages Feb 20, 2024 – Feb 22, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rebase: make warning less passive aggressive

From: Harmen Stoppels <[email protected]>

When you run git rebase --continue when no rebase is in progress, git outputs fatal: no rebase in progress? which is not a question but a statement. This commit makes it appear as a statement.

---
rebase: make warning less passive aggressive

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1669%2Fhaampie%2Ffix%2Fpassive-agressive-message-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1669/haampie/fix/passive-agressive-message-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1669

 builtin/rebase.c | 2 +-
 po/bg.po         | 2 +-
 po/ca.po         | 2 +-
 po/de.po         | 2 +-
 po/el.po         | 2 +-
 po/es.po         | 2 +-
 po/fr.po         | 2 +-
 po/id.po         | 2 +-
 po/it.po         | 2 +-
 po/ko.po         | 2 +-
 po/pl.po         | 2 +-
 po/pt_PT.po      | 2 +-
 po/ru.po         | 2 +-
 po/sv.po         | 2 +-
 po/tr.po         | 2 +-
 po/uk.po         | 2 +-
 po/vi.po         | 2 +-
 po/zh_CN.po      | 2 +-
 po/zh_TW.po      | 2 +-
 19 files changed, 19 insertions(+), 19 deletions(-)
builtin/rebase.c +1 -1
index 5b086f651a6..415783c4a21 100644
@@ -1254,7 +1254,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
 		die(_("options '%s' and '%s' cannot be used together"), "--root", "--fork-point");
 
 	if (options.action != ACTION_NONE && !in_progress)
-		die(_("No rebase in progress?"));
+		die(_("No rebase in progress"));
 
 	if (options.action == ACTION_EDIT_TODO && !is_merge(&options))
 		die(_("The --edit-todo action can only be used during "
po/bg.po +1 -1
index 6b95addef41..e54a2abf94a 100644
@@ -10782,7 +10782,7 @@ msgstr ""
 "„preserve“.\n"
 "Тази стойност вече не се поддържа, заменете я с „merges“."
 
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Изглежда в момента не тече пребазиране"
 
 msgid "The --edit-todo action can only be used during interactive rebase."
po/ca.po +1 -1
index bcb4da80fb9..2bcda556147 100644
@@ -10390,7 +10390,7 @@ msgstr ""
 "Nota: la configuració «pull.rebase» també podria estar establerta a\n"
 "+-«preserve», que ja no s'admet; utilitzeu «merge» en el seu lloc"
 
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "No hi ha un «rebase» en curs?"
 
 msgid "The --edit-todo action can only be used during interactive rebase."
po/de.po +1 -1
index 37d6c809983..7ea1dd5b1a0 100644
@@ -10522,7 +10522,7 @@ msgstr ""
 "'preserve' gesetzt, was nicht länger unterstützt wird; nutzen Sie\n"
 "stattdessen 'merges'"
 
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Kein Rebase im Gange?"
 
 msgid "The --edit-todo action can only be used during interactive rebase."
po/el.po +1 -1
index 703f46d0c7c..d68d2542a4f 100644
@@ -15726,7 +15726,7 @@ msgid "It looks like 'git am' is in progress. Cannot rebase."
 msgstr ""
 
 #: builtin/rebase.c:1208 git-legacy-rebase.sh:406
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr ""
 
 #: builtin/rebase.c:1212 git-legacy-rebase.sh:417
po/es.po +1 -1
index 1ff5ff3911d..55fb9e0c81d 100644
@@ -10109,7 +10109,7 @@ msgstr ""
 "configurada a 'preserve', el cual ya no es soportado; usa 'merges' en\n"
 "su lugar"
 
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "¿No hay rebase en progreso?"
 
 msgid "The --edit-todo action can only be used during interactive rebase."
po/fr.po +1 -1
index 736a90f6bb6..cae2b1dd12b 100644
@@ -10495,7 +10495,7 @@ msgstr ""
 "Note : votre configuration `pull.rebase` peut aussi être 'preserve',\n"
 "qui n'est plus géré ; utilisez 'merges' à la place"
 
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Pas de rebasage en cours ?"
 
 msgid "The --edit-todo action can only be used during interactive rebase."
po/id.po +1 -1
index 3e8b212b617..966ebb9a269 100644
@@ -12843,7 +12843,7 @@ msgstr ""
 "yang tidak lagi didukung; gunakan 'merges' sebagai gantinya"
 
 #: builtin/rebase.c
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Tidak ada pendasaran ulang yang sedang berjalan?"
 
 #: builtin/rebase.c
po/it.po +1 -1
index c31560834d8..1b1ca2d2990 100644
@@ -19666,7 +19666,7 @@ msgid "cannot combine '--root' with '--fork-point'"
 msgstr "impossibile combinare '--root' con '--fork-point'"
 
 #: builtin/rebase.c:1495
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Nessun rebase in corso?"
 
 #: builtin/rebase.c:1499
po/ko.po +1 -1
index 5d190e52380..783d5c5e8ad 100644
@@ -16245,7 +16245,7 @@ msgid "It looks like 'git am' is in progress. Cannot rebase."
 msgstr "'git am'이 진행 중인 것처럼 보입니다. 리베이스할 수 없습니다."
 
 #: git-rebase.sh:403
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "리베이스가 진행 중이지 않습니다"
 
 #: git-rebase.sh:414
po/pl.po +1 -1
index 0ec127e14cc..5f361d558ba 100644
@@ -20449,7 +20449,7 @@ msgid "cannot combine '--root' with '--fork-point'"
 msgstr "„--root” i „--fork-point” się wykluczają"
 
 #: builtin/rebase.c:1202
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Nie trwa żadne przestawianie?"
 
 #: builtin/rebase.c:1206
po/pt_PT.po +1 -1
index 32142531bbd..6adae673fd3 100644
@@ -20608,7 +20608,7 @@ msgid "--preserve-merges was replaced by --rebase-merges"
 msgstr ""
 
 #: builtin/rebase.c:1230
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Algum rebase em curso?"
 
 #: builtin/rebase.c:1234
po/ru.po +1 -1
index 3e56eb546ea..ebcd6dded70 100644
@@ -9986,7 +9986,7 @@ msgid ""
 "which is no longer supported; use 'merges' instead"
 msgstr ""
 
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Нет перемещения в процессе?"
 
 msgid "The --edit-todo action can only be used during interactive rebase."
po/sv.po +1 -1
index 786c2f749e7..d11bd0fc59c 100644
@@ -10153,7 +10153,7 @@ msgstr ""
 "Observera: Din inställning för ”pull.rebase” kan också vara satt till\n"
 "”preserve”, som inte längre stöds; använd ”merges” istället"
 
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Ingen ombasering pågår?"
 
 msgid "The --edit-todo action can only be used during interactive rebase."
po/tr.po +1 -1
index 19d6661bbe6..d568956c686 100644
@@ -10278,7 +10278,7 @@ msgstr ""
 "Not: `pull.rebase` yapılandırmanız, artık desteklenmeyen'\n"
 "'preserve' olarak ayarlı olabilir; yerine 'merges' kullanın"
 
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Sürmekte olan bir yeniden temellendirme yok"
 
 msgid "The --edit-todo action can only be used during interactive rebase."
po/uk.po +1 -1
index 0507e387bab..cd09d641817 100644
@@ -10341,7 +10341,7 @@ msgstr ""
 "значення \"preserve\",\n"
 "який більше не підтримується; натомість використовуйте \"merges\""
 
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Перебазування не відбувається?"
 
 msgid "The --edit-todo action can only be used during interactive rebase."
po/vi.po +1 -1
index d673745ac5b..869fb735c83 100644
@@ -9963,7 +9963,7 @@ msgstr ""
 "'preserve',\n"
 "cái mà giờ không còn được hỗ trợ nữa; dùng 'merges' để thay thế"
 
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "Không có tiến trình rebase nào phải không?"
 
 msgid "The --edit-todo action can only be used during interactive rebase."
po/zh_CN.po +1 -1
index 39efaf1012a..60ca9ffb2cb 100644
@@ -12723,7 +12723,7 @@ msgstr ""
 "取而代之请使用 'merges'"
 
 #: builtin/rebase.c
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "没有正在进行的变基?"
 
 #: builtin/rebase.c
po/zh_TW.po +1 -1
index 312dd128a41..5794e3f36fc 100644
@@ -12603,7 +12603,7 @@ msgstr ""
 "請改用 “merges”"
 
 #: builtin/rebase.c
-msgid "No rebase in progress?"
+msgid "No rebase in progress"
 msgstr "沒有正在進行的重定基底?"
 
 #: builtin/rebase.c

base-commit: 96c8a0712e569dd2812bf4fb5e72113caf326500

Signature · 1 line
gitgitgadget
#1 lore raw
Quoted 5 lines · Harmen Stoppels via GitGitGadget

From: Harmen Stoppels <[email protected]>

When you run git rebase --continue when no rebase is in progress, git outputs fatal: no rebase in progress? which is not a question but a statement. This commit makes it appear as a statement.

"This commit makes it appear" -> "Make it appear" (see SubmittingPatches).

Quoted 1 line
 builtin/rebase.c | 2 +-

This change is very good, but a commit that touches code should not touch po/ localizations in this project. They are updated to match the code change by respective language teams.

Quoted 25 lines
 po/bg.po         | 2 +-
 po/ca.po         | 2 +-
 po/de.po         | 2 +-
 po/el.po         | 2 +-
 po/es.po         | 2 +-
 po/fr.po         | 2 +-
 po/id.po         | 2 +-
 po/it.po         | 2 +-
 po/ko.po         | 2 +-
 po/pl.po         | 2 +-
 po/pt_PT.po      | 2 +-
 po/ru.po         | 2 +-
 po/sv.po         | 2 +-
 po/tr.po         | 2 +-
 po/uk.po         | 2 +-
 po/vi.po         | 2 +-
 po/zh_CN.po      | 2 +-
 po/zh_TW.po      | 2 +-
 19 files changed, 19 insertions(+), 19 deletions(-)
builtin/rebase.c +0 -0
index 5b086f651a6..415783c4a21 100644

builtin/rebase.c int cmd_rebase(int argc, const char **argv, const char *prefix) · line 1260

Quoted 8 lines
builtin/rebase.c +1 -1
@@ -1254,7 +1254,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
 		die(_("options '%s' and '%s' cannot be used together"), "--root", "--fork-point");
 
 	if (options.action != ACTION_NONE && !in_progress)
-		die(_("No rebase in progress?"));
+		die(_("No rebase in progress"));
 
 	if (options.action == ACTION_EDIT_TODO && !is_merge(&options))
 		die(_("The --edit-todo action can only be used during "

Interestingly this change does not break any test in t/ directory, which means we have a gap in test coverage. It should not be any part of this patch, but we may want to add a test to exercise this codepath (#leftoverbits).

Thanks.

#2 lore raw
Quoted 8 lines · Junio C Hamano
Quoted 5 lines · Harmen Stoppels via GitGitGadget

From: Harmen Stoppels <[email protected]>

When you run git rebase --continue when no rebase is in progress, git outputs fatal: no rebase in progress? which is not a question but a statement. This commit makes it appear as a statement.

Quoted 8 lines

"This commit makes it appear" -> "Make it appear" (see SubmittingPatches).

Quoted 1 line
 builtin/rebase.c | 2 +-

This change is very good, but a commit that touches code should not touch po/ localizations in this project. They are updated to match the code change by respective language teams.

Or if it does touch the po files it could as well update the translations.

There are changes that can be trivially translated without any knowledge of the target language.

Thanks

Michal

#3 lore raw
Quoted 5 lines · Michal Suchánek

Or if it does touch the po files it could as well update the translations.

There are changes that can be trivially translated without any knowledge of the target language.

You need to know the target language before deciding it is OK and sufficient to just remove ̉¿? from around a sentence to make it from a question to a statement of a fact. You may know enough, but reviewers may not be. In addition, it would allow bypassing the language teams, which is the most serious problem I see in such an attitude.

#4 lore raw
Quoted 8 lines · Junio C Hamano
Quoted 5 lines · Michal Suchánek

Or if it does touch the po files it could as well update the translations.

There are changes that can be trivially translated without any knowledge of the target language.

Quoted 6 lines

You need to know the target language before deciding it is OK and sufficient to just remove ̉¿? from around a sentence to make it from a question to a statement of a fact. You may know enough, but reviewers may not be. In addition, it would allow bypassing the language teams, which is the most serious problem I see in such an attitude.

Oops, "attitude" -> "approach".

#5 lore raw
Quoted 10 lines · Junio C Hamano
Quoted 8 lines · Junio C Hamano
Quoted 5 lines · Michal Suchánek

Or if it does touch the po files it could as well update the translations.

There are changes that can be trivially translated without any knowledge of the target language.

Quoted 8 lines
Quoted 6 lines

You need to know the target language before deciding it is OK and sufficient to just remove ̉¿? from around a sentence to make it from a question to a statement of a fact. You may know enough, but reviewers may not be. In addition, it would allow bypassing the language teams, which is the most serious problem I see in such an attitude.

Oops, "attitude" -> "approach".

That's certainly true that even if you know how to remove a question mark you may not find a reviewer who knows how to remove one.

Nonetheless, if you do find both a patch author and a reviewer that know how to remove a question mark what is the problem with not involving several language teams to remove a question mark?

Thanks

Michal

#6 lore raw
Quoted 9 lines · On Wednesday, 21 February 2024 19:30:18 CET Michal Suchánek wrote:
Quoted 8 lines · Junio C Hamano
Quoted 6 lines · Junio C Hamano
Quoted 4 lines · Michal Suchánek

Or if it does touch the po files it could as well update the translations.

There are changes that can be trivially translated without any

knowledge

Quoted 14 lines
Quoted 10 lines
Quoted 8 lines
Quoted 1 line

of the target language.

You need to know the target language before deciding it is OK and sufficient to just remove ̉¿? from around a sentence to make it from a question to a statement of a fact. You may know enough, but reviewers may not be. In addition, it would allow bypassing the language teams, which is the most serious problem I see in such an attitude.

Oops, "attitude" -> "approach".

That's certainly true that even if you know how to remove a question mark you may not find a reviewer who knows how to remove one.

Quoted 9 lines

Nonetheless, if you do find both a patch author and a reviewer that know how to remove a question mark what is the problem with not involving several language teams to remove a question mark?

Thanks

Michal

As a translator, I'm less bothered by editing a sentence to remove a question mark (maybe enforcing a language style and reformulating the sentence by the way), than by translating again and again similar sentences.

Thanks

JN

#7 lore raw
Quoted 3 lines · Jean-Noël AVILA

As a translator, I'm less bothered by editing a sentence to remove a question mark (maybe enforcing a language style and reformulating the sentence by the way), than by translating again and again similar sentences.

Sure, but if the original in C locale used to be "FOO BAR?" and you translated it to "foo bar?" in your language, and then a patch updates the string in the source to "FOO BAR", doesn't msgmerge notice that the original as a "fuzzy" matching and offer you something like

    # fuzzy
    msgid "FOO BAR"
    msgstr "foo bar?"

so that all you have to do is to remove '?' anyway? So I do not think you'd need to translate the "FOO BAR" part again and again.

But the above assumes that for your language, the ONLY thing to turn such a rhetorical "passive aggressive" question into grammatically correct statement of a fact is to remove the question mark. It may not be universally true for all languages, and for some language, even after msgmerge did its job correctly, you may need to do more than just removing the question mark to adjust the remaining "foo bar" part.

#8 lore raw
Quoted 19 lines · Junio C Hamano
Quoted 3 lines · Jean-Noël AVILA

As a translator, I'm less bothered by editing a sentence to remove a question mark (maybe enforcing a language style and reformulating the sentence by the way), than by translating again and again similar sentences.

Sure, but if the original in C locale used to be "FOO BAR?" and you translated it to "foo bar?" in your language, and then a patch updates the string in the source to "FOO BAR", doesn't msgmerge notice that the original as a "fuzzy" matching and offer you something like

#, fuzzy
msgid "FOO BAR"
msgstr "foo bar?"

so that all you have to do is to remove '?' anyway? So I do not think you'd need to translate the "FOO BAR" part again and again.

Quoted 7 lines

But the above assumes that for your language, the ONLY thing to turn such a rhetorical "passive aggressive" question into grammatically correct statement of a fact is to remove the question mark. It may not be universally true for all languages, and for some language, even after msgmerge did its job correctly, you may need to do more than just removing the question mark to adjust the remaining "foo bar" part.

Hopefully the last message on this topic from me. I just tried this:

* apply v2 of "No rebase in progress?" -> "no rebase in progress" patch from Harmen. This only changed _("") string, without touching any po/* files.

* follow po/README.md and pretend as if I were a po/es.po team member, which involved running the command:

	$ make po-update PO_FILE=po/es.po

* view the resulting po/es.po, which will be the starting point of a new translation.

        $ git diff po/es.po

The last one showed me this snippet:

-msgid "No rebase in progress?"
+#: builtin/rebase.c:1257
+#, fuzzy
+msgid "no rebase in progress"
msgstr "¿No hay rebase en progreso?"

The "#, fuzzy" thing is a signal that an old msgid has been updated and corresponding msgstr may need to be updated.

The primary problem I had with Harmen's v1 was that it touched po/ file in the first place (which was corrected in v2), but the updates to po files it did looked like so:

-msgid "No rebase in progress?"
+msgid "No rebase in progress"
msgstr "¿No hay rebase en progreso?"

Notice the lack of "#, fuzzy" marking? If v1 were accepted with these changes, then the "po-update" step I showed earlier would have produced something like this instead:

+#: builtin/rebase.c:1257
msgid "no rebase in progress"
msgstr "¿No hay rebase en progreso?"

As msgid alone was updated already, the "po-update" step has no idea that the translated msgstr is out of date. We do not get the helpful "#, fuzzy" comment to tell the translator which msgstr is out of date and needs attention.

So it is another reason why we want the developers to concentrate only on writing good C-locale messages inside _("") and N_(""), without touching po/ directory at all. It would avoid making changes that can confuse toolchain l10n people rely on (like the presence of "fuzzy" comments).

#9 lore raw
In reply to Junio C Hamano
Quoted 3 lines · On Wednesday, 21 February 2024 23:46:10 CET Junio C Hamano wrote:
Quoted 1 line · Jean-Noël AVILA

As a translator, I'm less bothered by editing a sentence to remove a

question

Quoted 1 line
Quoted 1 line

mark (maybe enforcing a language style and reformulating the sentence by

the

Quoted 8 lines
Quoted 1 line

way), than by translating again and again similar sentences.

Sure, but if the original in C locale used to be "FOO BAR?" and you translated it to "foo bar?" in your language, and then a patch updates the string in the source to "FOO BAR", doesn't msgmerge notice that the original as a "fuzzy" matching and offer you something like

Quoted 6 lines
    # fuzzy
    msgid "FOO BAR"
    msgstr "foo bar?"

so that all you have to do is to remove '?' anyway?

Yes, it works as expected.

Quoted 2 lines

So I do not
think you'd need to translate the "FOO BAR" part again and again.

Sorry for not being clear: I don't consider changing a question to an assertion is translating "again and again". This change is completely entitled to end up on translators desk, because it involves possibly changing the whole structure of the sentence.

About "again and again", I was more refering to strings such as "could not stat '%s'" and then "could not stat file '%s'".

Quoted 9 lines

But the above assumes that for your language, the ONLY thing to turn such a rhetorical "passive aggressive" question into grammatically correct statement of a fact is to remove the question mark. It may not be universally true for all languages, and for some language, even after msgmerge did its job correctly, you may need to do more than just removing the question mark to adjust the remaining "foo bar" part.

I perfectly agree with you.

Thanks

#10 lore raw

Hello,

Quoted 8 lines · Jean-Noël AVILA
Quoted 3 lines · On Wednesday, 21 February 2024 23:46:10 CET Junio C Hamano wrote:
Quoted 1 line · Jean-Noël AVILA

As a translator, I'm less bothered by editing a sentence to remove a

question

Quoted 1 line
Quoted 1 line

mark (maybe enforcing a language style and reformulating the sentence by

the

Quoted 1 line
Quoted 1 line

way), than by translating again and again similar sentences.

Indeed, the style part is the key here.

The message that is changed here was quite stylistically poorly written which is why only removing the question mark is correct, and it's why it's changed in the first place, too.

While this is faithfully reflected in multiple language translations there is no saying that's the case for all languages, at least basic understanding of the grammar of the language in question is needed to verify that.

Quoted 10 lines
Quoted 8 lines

But the above assumes that for your language, the ONLY thing to turn such a rhetorical "passive aggressive" question into grammatically correct statement of a fact is to remove the question mark. It may not be universally true for all languages, and for some language, even after msgmerge did its job correctly, you may need to do more than just removing the question mark to adjust the remaining "foo bar" part.

I perfectly agree with you.

Indeed, and that's why per-language review for such change is needed.

Thanks

Michal

#11 lore raw
In reply to Jean-Noël AVILA
Quoted 2 lines · Jean-Noël AVILA

About "again and again", I was more refering to strings such as "could not stat '%s'" and then "could not stat file '%s'".

I completely agree with that.

But the message you responded was not about that kind of burden to translators. It was arguing that it somehow is better to update the in-code _("string") at the same time as updating msgid and msgstr in the same patch (it may not have been directly "arguing for", but essentially doing so with a rhetorical question).

So your "I do not want to translate again and again" thrown into that context utterly confused me. I didn't quite see how the "everything in one patch" approach would help translaters by not having them translate "again and again".

Thanks for clearing my confusion.

#12 lore raw
In reply to Harmen Stoppels via GitGitGadget
Quoted 40 lines · Harmen Stoppels via GitGitGadget

From: Harmen Stoppels <[email protected]>

When you run git rebase --continue when no rebase is in progress, git outputs fatal: no rebase in progress? which is not a question but a statement. This commit makes it appear as a statement.

---
rebase: make warning less passive aggressive

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1669%2Fhaampie%2Ffix%2Fpassive-agressive-message-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1669/haampie/fix/passive-agressive-message-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1669

 builtin/rebase.c | 2 +-
 po/bg.po         | 2 +-
 po/ca.po         | 2 +-
 po/de.po         | 2 +-
 po/el.po         | 2 +-
 po/es.po         | 2 +-
 po/fr.po         | 2 +-
 po/id.po         | 2 +-
 po/it.po         | 2 +-
 po/ko.po         | 2 +-
 po/pl.po         | 2 +-
 po/pt_PT.po      | 2 +-
 po/ru.po         | 2 +-
 po/sv.po         | 2 +-
 po/tr.po         | 2 +-
 po/uk.po         | 2 +-
 po/vi.po         | 2 +-
 po/zh_CN.po      | 2 +-
 po/zh_TW.po      | 2 +-
 19 files changed, 19 insertions(+), 19 deletions(-)
builtin/rebase.c +0 -0
index 5b086f651a6..415783c4a21 100644

builtin/rebase.c int cmd_rebase(int argc, const char **argv, const char *prefix) · line 1257

Quoted 5 lines
builtin/rebase.c +1 -1
@@ -1254,7 +1254,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
 		die(_("options '%s' and '%s' cannot be used together"), "--root", "--fork-point");
 
 	if (options.action != ACTION_NONE && !in_progress)
-		die(_("No rebase in progress?"));
+		die(_("No rebase in progress"));

While we're at it changing this message, do we also want to convert it to start with a lower-case letter so that it aligns with our error message style?

Patrick

#13 lore raw
Quoted 7 lines · Patrick Steinhardt

builtin/rebase.c int cmd_rebase(int argc, const char **argv, const char *prefix) · line 1257

Quoted 3 lines
builtin/rebase.c +1 -1
 	if (options.action != ACTION_NONE && !in_progress)
-		die(_("No rebase in progress?"));
+		die(_("No rebase in progress"));

While we're at it changing this message, do we also want to convert it to start with a lower-case letter so that it aligns with our error message style?

Good eyes. Thanks for a good suggestion.

#14 lore raw

PATCH v2 1/1 rebase: make warning less passive aggressive

In reply to Harmen Stoppels via GitGitGadget

From: Harmen Stoppels <[email protected]>

When you run git rebase --continue when no rebase is in progress, git outputs fatal: No rebase in progress? which is not a question but a statement. Make it appear as a statement, and use lowercase to align with error message style.

---
rebase: make warning less passive aggressive

cc Patrick Steinhardt [email protected]

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1669%2Fhaampie%2Ffix%2Fpassive-agressive-message-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1669/haampie/fix/passive-agressive-message-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1669

Range-diff vs v1:

 1:  4dfc578da84 < -:  ----------- rebase: make warning less passive aggressive
 -:  ----------- > 1:  a6f7a3a2477 rebase: make warning less passive aggressive
 builtin/rebase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
builtin/rebase.c +1 -1
index 5b086f651a6..6ead9465a42 100644
@@ -1254,7 +1254,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
 		die(_("options '%s' and '%s' cannot be used together"), "--root", "--fork-point");
 
 	if (options.action != ACTION_NONE && !in_progress)
-		die(_("No rebase in progress?"));
+		die(_("no rebase in progress"));
 
 	if (options.action == ACTION_EDIT_TODO && !is_merge(&options))
 		die(_("The --edit-todo action can only be used during "

base-commit: 96c8a0712e569dd2812bf4fb5e72113caf326500

Signature · 1 line
gitgitgadget
#15 lore raw
Quoted 8 lines · Harmen Stoppels via GitGitGadget

From: Harmen Stoppels <[email protected]>

When you run git rebase --continue when no rebase is in progress, git outputs fatal: No rebase in progress? which is not a question but a statement. Make it appear as a statement, and use lowercase to align with error message style.

Got nothing else to add, this looks good to me. Thanks!

Patrick

Quoted 36 lines

---
rebase: make warning less passive aggressive

cc Patrick Steinhardt [email protected]

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1669%2Fhaampie%2Ffix%2Fpassive-agressive-message-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1669/haampie/fix/passive-agressive-message-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1669

Range-diff vs v1:

 1:  4dfc578da84 < -:  ----------- rebase: make warning less passive aggressive
 -:  ----------- > 1:  a6f7a3a2477 rebase: make warning less passive aggressive
 builtin/rebase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
builtin/rebase.c +1 -1
index 5b086f651a6..6ead9465a42 100644
@@ -1254,7 +1254,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
 		die(_("options '%s' and '%s' cannot be used together"), "--root", "--fork-point");
 
 	if (options.action != ACTION_NONE && !in_progress)
-		die(_("No rebase in progress?"));
+		die(_("no rebase in progress"));
 
 	if (options.action == ACTION_EDIT_TODO && !is_merge(&options))
 		die(_("The --edit-todo action can only be used during "

base-commit: 96c8a0712e569dd2812bf4fb5e72113caf326500

Signature · 1 line
gitgitgadget
#16 lore raw
In reply to Harmen Stoppels via GitGitGadget
Quoted 9 lines · Harmen Stoppels via GitGitGadget

From: Harmen Stoppels <[email protected]>

When you run git rebase --continue when no rebase is in progress, git outputs fatal: No rebase in progress? which is not a question but a statement. Make it appear as a statement, and use lowercase to align with error message style.

---

I’ve interpreted this error as: I’m not quite sure but it looks like you are not in the middle of a rebase? Like it can’t be completely sure. Maybe from a more “primitive” time, implementation-wise?[1] :)

(I waited to make this reply in order to see what others would say. And apparently there is no need for a hedging/passive aggressive question mark.)

† 1: 031321c654d (Add --continue and --abort options to git-rebase.,

    2006-04-26)
Signature · 1 line
Kristoffer Haugsbakk
#17 lore raw
Quoted 3 lines · Kristoffer Haugsbakk

I’ve interpreted this error as: I’m not quite sure but it looks like you are not in the middle of a rebase? Like it can’t be completely sure. Maybe from a more “primitive” time, implementation-wise?[1] :)

It certainly is a good point. At least one other message in the same command is equally less assertive, e.g.

	die(_("It looks like 'git am' is in progress. Cannot rebase."));

It may have been OK to be uncertain in the earlier times back when we did not much know what we were doing, but by now we should be more assertive, so that the end-users can more easily complain, saying "The command said I was not rebasing, but I was! Here is what I did", which would hopefully be a valuable feedback for improving the logic to diagnose what state we are in.

So, making it clear that it is a statement of a fact, or at least we are telling the users what we _think_ the state is assertively, is a good idea either way.

Thanks.