[PATCH 1/7] merge: improve fatal fast-forward message
To
git@vger.kernel.org
Cc
Alex Henrie
Ævar Arnfjörð Bjarmason
Randall S . Becker
Nguyễn Thái Ngọc Duy
Denton Liu
Elijah Newren
Junio C Hamano
Felipe Contreras
From
Felipe Contreras
See Also
Prev
Date
2021-07-22 00:08:48 UTC
The documentation of --ff-only says:

  With `--ff-only`, resolve the merge as a fast-forward when possible.
  When not possible, refuse to merge and exit with a non-zero status.

So when the user does --ff-only, and a fast-forward is not possible, the
user wants git to abort, therefore an error message of:

 fatal: Not possible to fast-forward, aborting.

is redundant; no need to say ", aborting".

Additionally, use lowercase and lose the full stop to be consistent with
other die() messages.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin/merge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/merge.c b/builtin/merge.c
index a8a843b1f5..05e631229d 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1620,7 +1620,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 	}
 
 	if (fast_forward == FF_ONLY)
-		die(_("Not possible to fast-forward, aborting."));
+		die(_("unable to fast-forward"));
 
 	if (autostash)
 		create_autostash(the_repository,
-- 
2.32.0.40.gb9b36f9b52