@@ -63,8 +63,18 @@ N_("The previous cherry-pick is now empty, possibly due to conflict resolution.\
63
63
"If you wish to commit it anyway, use:\n"
64
64
"\n"
65
65
" 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"
66
73
"\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" );
68
78
69
79
static const char * use_message_buffer ;
70
80
static const char commit_editmsg [] = "COMMIT_EDITMSG" ;
@@ -107,6 +117,7 @@ static enum {
107
117
static const char * cleanup_arg ;
108
118
109
119
static enum commit_whence whence ;
120
+ static int sequencer_in_use ;
110
121
static int use_editor = 1 , include_status = 1 ;
111
122
static int show_ignored_in_status , have_option_m ;
112
123
static const char * only_include_assumed ;
@@ -141,8 +152,11 @@ static void determine_whence(struct wt_status *s)
141
152
{
142
153
if (file_exists (git_path ("MERGE_HEAD" )))
143
154
whence = FROM_MERGE ;
144
- else if (file_exists (git_path ("CHERRY_PICK_HEAD" )))
155
+ else if (file_exists (git_path ("CHERRY_PICK_HEAD" ))) {
145
156
whence = FROM_CHERRY_PICK ;
157
+ if (file_exists (git_path ("sequencer" )))
158
+ sequencer_in_use = 1 ;
159
+ }
146
160
else
147
161
whence = FROM_COMMIT ;
148
162
if (s )
@@ -810,8 +824,13 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
810
824
run_status (stdout , index_file , prefix , 0 , s );
811
825
if (amend )
812
826
fputs (_ (empty_amend_advice ), stderr );
813
- else if (whence == FROM_CHERRY_PICK )
827
+ else if (whence == FROM_CHERRY_PICK ) {
814
828
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
+ }
815
834
return 0 ;
816
835
}
817
836
0 commit comments