diff mbox series

[RFC,30/35] pull: add diverging advice on fast-forward mode

Message ID 20210705123209.1808663-31-felipe.contreras@gmail.com (mailing list archive)
State New, archived
Headers show
Series git update: fix broken git pull | expand

Commit Message

Felipe Contreras July 5, 2021, 12:32 p.m. UTC
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin/pull.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/builtin/pull.c b/builtin/pull.c
index cbc102ee45..f4f822700a 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -1118,8 +1118,10 @@  int cmd_pull(int argc, const char **argv, const char *prefix)
 		if (!mode && opt_verbosity >= 0)
 			show_advice_pull_non_ff();
 
-		if (mode == PULL_MODE_FAST_FORWARD)
+		if (mode == PULL_MODE_FAST_FORWARD) {
+			diverging_advice();
 			die(_("The pull was not fast-forward, either merge or rebase.\n"));
+		}
 	}
 
 	if (opt_rebase >= REBASE_TRUE) {