@@ -123,7 +123,7 @@ static void write_cherry_pick_head(struct commit *commit, const char *pseudoref)
123
123
strbuf_release (& buf );
124
124
}
125
125
126
- static void print_advice (int show_hint )
126
+ static void print_advice (int show_hint , struct replay_opts * opts )
127
127
{
128
128
char * msg = getenv ("GIT_CHERRY_PICK_HELP" );
129
129
@@ -138,10 +138,15 @@ static void print_advice(int show_hint)
138
138
return ;
139
139
}
140
140
141
- if (show_hint )
142
- advise (_ ("after resolving the conflicts, mark the corrected paths\n"
143
- "with 'git add <paths>' or 'git rm <paths>'\n"
144
- "and commit the result with 'git commit'" ));
141
+ if (show_hint ) {
142
+ if (opts -> no_commit )
143
+ advise (_ ("after resolving the conflicts, mark the corrected paths\n"
144
+ "with 'git add <paths>' or 'git rm <paths>'" ));
145
+ else
146
+ advise (_ ("after resolving the conflicts, mark the corrected paths\n"
147
+ "with 'git add <paths>' or 'git rm <paths>'\n"
148
+ "and commit the result with 'git commit'" ));
149
+ }
145
150
}
146
151
147
152
static void write_message (struct strbuf * msgbuf , const char * filename )
@@ -423,7 +428,7 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
423
428
: _ ("could not apply %s... %s" ),
424
429
find_unique_abbrev (commit -> object .sha1 , DEFAULT_ABBREV ),
425
430
msg .subject );
426
- print_advice (res == 1 );
431
+ print_advice (res == 1 , opts );
427
432
rerere (opts -> allow_rerere_auto );
428
433
} else {
429
434
if (!opts -> no_commit )
0 commit comments