@@ -48,7 +48,7 @@ static const char * const builtin_merge_usage[] = {
4848
4949static int show_diffstat = 1 , shortlog_len = -1 , squash ;
5050static int option_commit = 1 , allow_fast_forward = 1 ;
51- static int fast_forward_only , option_edit ;
51+ static int fast_forward_only , option_edit = -1 ;
5252static int allow_trivial = 1 , have_message ;
5353static int overwrite_ignore = 1 ;
5454static struct strbuf merge_msg = STRBUF_INIT ;
@@ -193,7 +193,7 @@ static struct option builtin_merge_options[] = {
193193 "create a single commit instead of doing a merge" ),
194194 OPT_BOOLEAN (0 , "commit" , & option_commit ,
195195 "perform a commit if the merge succeeds (default)" ),
196- OPT_BOOLEAN ('e' , "edit" , & option_edit ,
196+ OPT_BOOL ('e' , "edit" , & option_edit ,
197197 "edit message before committing" ),
198198 OPT_BOOLEAN (0 , "ff" , & allow_fast_forward ,
199199 "allow fast-forward (default)" ),
@@ -1287,11 +1287,15 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
12871287 merge_remote_util (commit ) &&
12881288 merge_remote_util (commit )-> obj &&
12891289 merge_remote_util (commit )-> obj -> type == OBJ_TAG ) {
1290- option_edit = 1 ;
1290+ if (option_edit < 0 )
1291+ option_edit = 1 ;
12911292 allow_fast_forward = 0 ;
12921293 }
12931294 }
12941295
1296+ if (option_edit < 0 )
1297+ option_edit = 0 ;
1298+
12951299 if (!use_strategies ) {
12961300 if (!remoteheads -> next )
12971301 add_strategies (pull_twohead , DEFAULT_TWOHEAD );
0 commit comments