@@ -63,8 +63,18 @@ N_("The previous cherry-pick is now empty, possibly due to conflict resolution.\
6363"If you wish to commit it anyway, use:\n"
6464"\n"
6565" git commit --allow-empty\n"
66+ "\n" );
67+
68+ static const char empty_cherry_pick_advice_single [] =
69+ N_ ("Otherwise, please use 'git reset'\n" );
70+
71+ static const char empty_cherry_pick_advice_multi [] =
72+ N_ ("If you wish to skip this commit, use:\n"
6673"\n"
67- "Otherwise, please use 'git reset'\n" );
74+ " git reset\n"
75+ "\n"
76+ "Then \"git cherry-pick --continue\" will resume cherry-picking\n"
77+ "the remaining commits.\n" );
6878
6979static const char * use_message_buffer ;
7080static const char commit_editmsg [] = "COMMIT_EDITMSG" ;
@@ -107,6 +117,7 @@ static enum {
107117static const char * cleanup_arg ;
108118
109119static enum commit_whence whence ;
120+ static int sequencer_in_use ;
110121static int use_editor = 1 , include_status = 1 ;
111122static int show_ignored_in_status , have_option_m ;
112123static const char * only_include_assumed ;
@@ -141,8 +152,11 @@ static void determine_whence(struct wt_status *s)
141152{
142153 if (file_exists (git_path ("MERGE_HEAD" )))
143154 whence = FROM_MERGE ;
144- else if (file_exists (git_path ("CHERRY_PICK_HEAD" )))
155+ else if (file_exists (git_path ("CHERRY_PICK_HEAD" ))) {
145156 whence = FROM_CHERRY_PICK ;
157+ if (file_exists (git_path ("sequencer" )))
158+ sequencer_in_use = 1 ;
159+ }
146160 else
147161 whence = FROM_COMMIT ;
148162 if (s )
@@ -810,8 +824,13 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
810824 run_status (stdout , index_file , prefix , 0 , s );
811825 if (amend )
812826 fputs (_ (empty_amend_advice ), stderr );
813- else if (whence == FROM_CHERRY_PICK )
827+ else if (whence == FROM_CHERRY_PICK ) {
814828 fputs (_ (empty_cherry_pick_advice ), stderr );
829+ if (!sequencer_in_use )
830+ fputs (_ (empty_cherry_pick_advice_single ), stderr );
831+ else
832+ fputs (_ (empty_cherry_pick_advice_multi ), stderr );
833+ }
815834 return 0 ;
816835 }
817836
0 commit comments