diff options
author | Josh Steadmon <steadmon@google.com> | 2021-08-31 00:46:02 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-31 02:35:36 +0300 |
commit | 767a4ca648f8791c1fb623bd9f79fd8d7f026499 (patch) | |
tree | a412a04463d6b0bb7e36fcdabe5512d539b89593 /advice.c | |
parent | 2d755dfac9aadab25c3e025b849252b8c0a61465 (diff) |
sequencer: advise if skipping cherry-picked commit
Silently skipping commits when rebasing with --no-reapply-cherry-picks
(currently the default behavior) can cause user confusion. Issue
warnings when this happens, as well as advice on how to preserve the
skipped commits.
These warnings and advice are displayed only when using the (default)
"merge" rebase backend.
Update the git-rebase docs to mention the warnings and advice.
Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.c')
-rw-r--r-- | advice.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -34,6 +34,7 @@ int advice_checkout_ambiguous_remote_branch_name = 1; int advice_submodule_alternate_error_strategy_die = 1; int advice_add_ignored_file = 1; int advice_add_empty_pathspec = 1; +int advice_skipped_cherry_picks = 1; static int advice_use_color = -1; static char advice_colors[][COLOR_MAXLEN] = { @@ -96,6 +97,7 @@ static struct { { "submoduleAlternateErrorStrategyDie", &advice_submodule_alternate_error_strategy_die }, { "addIgnoredFile", &advice_add_ignored_file }, { "addEmptyPathspec", &advice_add_empty_pathspec }, + { "skippedCherryPicks", &advice_skipped_cherry_picks }, /* make this an alias for backward compatibility */ { "pushNonFastForward", &advice_push_update_rejected } @@ -133,6 +135,7 @@ static struct { [ADVICE_RM_HINTS] = { "rmHints", 1 }, [ADVICE_SEQUENCER_IN_USE] = { "sequencerInUse", 1 }, [ADVICE_SET_UPSTREAM_FAILURE] = { "setUpstreamFailure", 1 }, + [ADVICE_SKIPPED_CHERRY_PICKS] = { "skippedCherryPicks", 1 }, [ADVICE_STATUS_AHEAD_BEHIND_WARNING] = { "statusAheadBehindWarning", 1 }, [ADVICE_STATUS_HINTS] = { "statusHints", 1 }, [ADVICE_STATUS_U_OPTION] = { "statusUoption", 1 }, |