@@ -80,6 +80,8 @@ advice.*::
prevent the operation from being performed.
sequencerInUse::
Advice shown when a sequencer command is already in progress.
+ sequencerToAmend::
+ Advice shown when a sequencer is ready to ammend a commit.
implicitIdentity::
Advice on how to set your identity configuration when
your information is guessed from the system username and
@@ -66,6 +66,7 @@ static struct {
[ADVICE_RESOLVE_CONFLICT] = { "resolveConflict", 1 },
[ADVICE_RM_HINTS] = { "rmHints", 1 },
[ADVICE_SEQUENCER_IN_USE] = { "sequencerInUse", 1 },
+ [ADVICE_SEQUENCER_TO_AMEND] = { "sequencerToAmend", 1 },
[ADVICE_SET_UPSTREAM_FAILURE] = { "setUpstreamFailure", 1 },
[ADVICE_SKIPPED_CHERRY_PICKS] = { "skippedCherryPicks", 1 },
[ADVICE_STATUS_AHEAD_BEHIND_WARNING] = { "statusAheadBehindWarning", 1 },
@@ -41,6 +41,7 @@ struct string_list;
ADVICE_RESOLVE_CONFLICT,
ADVICE_RM_HINTS,
ADVICE_SEQUENCER_IN_USE,
+ ADVICE_SEQUENCER_TO_AMEND,
ADVICE_SET_UPSTREAM_FAILURE,
ADVICE_STATUS_AHEAD_BEHIND_WARNING,
ADVICE_STATUS_HINTS,
@@ -3559,7 +3559,7 @@ static int error_with_patch(struct repository *r,
if (intend_to_amend())
return -1;
- fprintf(stderr,
+ advise_if_enabled(ADVICE_SEQUENCER_TO_AMEND,
_("You can amend the commit now, with\n"
"\n"
" git commit --amend %s\n"
Show it like a proper advice, and also allow the possibility to turn that off for experts who don't need this annoying advice. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- Documentation/config/advice.txt | 2 ++ advice.c | 1 + advice.h | 1 + sequencer.c | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-)