diff options
author | Alex Henrie <alexhenrie24@gmail.com> | 2021-07-21 04:42:19 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-21 07:43:12 +0300 |
commit | 3d5fc24daefbdf56bc36a491aed0b7990fa0c62f (patch) | |
tree | ef359b69c3e219588b10455b6fe7d89976df9f93 /advice.c | |
parent | 1d25e5bdf5263a227d233eafcf028b36c72716f6 (diff) |
pull: abort if --ff-only is given and fast-forwarding is impossible
The warning about pulling without specifying how to reconcile divergent
branches says that after setting pull.rebase to true, --ff-only can
still be passed on the command line to require a fast-forward. Make that
actually work.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
[en: updated tests; note 3 fixes and 1 new failure]
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.c')
-rw-r--r-- | advice.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -286,6 +286,11 @@ void NORETURN die_conclude_merge(void) die(_("Exiting because of unfinished merge.")); } +void NORETURN die_ff_impossible(void) +{ + die(_("Not possible to fast-forward, aborting.")); +} + void advise_on_updating_sparse_paths(struct string_list *pathspec_list) { struct string_list_item *item; |