Git fork

Merge branch 'fc/advice-diverged-history'

After "git pull" that is configured with pull.rebase=false
merge.ff=only fails due to our end having our own development, give
advice messages to get out of the "Not possible to fast-forward"
state.

* fc/advice-diverged-history:
advice: add diverging advice for novices

+12
+2
Documentation/config/advice.txt
··· 136 136 Advice shown when either linkgit:git-add[1] or linkgit:git-rm[1] 137 137 is asked to update index entries outside the current sparse 138 138 checkout. 139 + diverging:: 140 + Advice shown when a fast-forward is not possible. 139 141 --
+9
advice.c
··· 46 46 [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge", 1 }, 47 47 [ADVICE_DETACHED_HEAD] = { "detachedHead", 1 }, 48 48 [ADVICE_SUGGEST_DETACHING_HEAD] = { "suggestDetachingHead", 1 }, 49 + [ADVICE_DIVERGING] = { "diverging", 1 }, 49 50 [ADVICE_FETCH_SHOW_FORCED_UPDATES] = { "fetchShowForcedUpdates", 1 }, 50 51 [ADVICE_GRAFT_FILE_DEPRECATED] = { "graftFileDeprecated", 1 }, 51 52 [ADVICE_IGNORED_HOOK] = { "ignoredHook", 1 }, ··· 219 220 220 221 void NORETURN die_ff_impossible(void) 221 222 { 223 + advise_if_enabled(ADVICE_DIVERGING, 224 + _("Diverging branches can't be fast-forwarded, you need to either:\n" 225 + "\n" 226 + "\tgit merge --no-ff\n" 227 + "\n" 228 + "or:\n" 229 + "\n" 230 + "\tgit rebase\n")); 222 231 die(_("Not possible to fast-forward, aborting.")); 223 232 } 224 233
+1
advice.h
··· 19 19 ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, 20 20 ADVICE_COMMIT_BEFORE_MERGE, 21 21 ADVICE_DETACHED_HEAD, 22 + ADVICE_DIVERGING, 22 23 ADVICE_SUGGEST_DETACHING_HEAD, 23 24 ADVICE_FETCH_SHOW_FORCED_UPDATES, 24 25 ADVICE_GRAFT_FILE_DEPRECATED,