[PATCH] rebase: emit one "fatal" in "fatal: fatal: <error>"

Subsystems: the rest

STALE1804d

2 messages, 2 authors, 2021-08-23 · open the first message on its own page

[PATCH] rebase: emit one "fatal" in "fatal: fatal: <error>"

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-08-23 13:07:45

The die() routine adds a "fatal: " prefix, there is no reason to add
another one. Fixes code added in e65123a71d0 (builtin rebase: support
`git rebase <upstream> <switch-to>`, 2018-09-04).

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 builtin/rebase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 33e09619005..66a0a0f0d03 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1918,7 +1918,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
 						   &options.orig_head))
 			options.head_name = NULL;
 		else
-			die(_("fatal: no such branch/commit '%s'"),
+			die(_("no such branch/commit '%s'"),
 			    branch_name);
 	} else if (argc == 0) {
 		/* Do not need to switch branches, we are already on it. */
-- 
2.33.0.662.gbc81f8cbdca

Re: [PATCH] rebase: emit one "fatal" in "fatal: fatal: <error>"

From: Pratik Karki <hidden>
Date: 2021-08-23 17:29:26

On Mon, Aug 23, 2021 at 6:52 PM Ævar Arnfjörð Bjarmason
[off-list ref] wrote:
quoted hunk
The die() routine adds a "fatal: " prefix, there is no reason to add
another one. Fixes code added in e65123a71d0 (builtin rebase: support
`git rebase <upstream> <switch-to>`, 2018-09-04).

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 builtin/rebase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 33e09619005..66a0a0f0d03 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1918,7 +1918,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
                                                   &options.orig_head))
                        options.head_name = NULL;
                else
-                       die(_("fatal: no such branch/commit '%s'"),
+                       die(_("no such branch/commit '%s'"),
                            branch_name);
        } else if (argc == 0) {
                /* Do not need to switch branches, we are already on it. */

Makes sense. Thank you for fixing this.

Best,
Pratik Karki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help