@@ -48,7 +48,7 @@ static const char * const builtin_merge_usage[] = {
48
48
49
49
static int show_diffstat = 1 , shortlog_len = -1 , squash ;
50
50
static 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 ;
52
52
static int allow_trivial = 1 , have_message ;
53
53
static int overwrite_ignore = 1 ;
54
54
static struct strbuf merge_msg = STRBUF_INIT ;
@@ -193,7 +193,7 @@ static struct option builtin_merge_options[] = {
193
193
"create a single commit instead of doing a merge" ),
194
194
OPT_BOOLEAN (0 , "commit" , & option_commit ,
195
195
"perform a commit if the merge succeeds (default)" ),
196
- OPT_BOOLEAN ('e' , "edit" , & option_edit ,
196
+ OPT_BOOL ('e' , "edit" , & option_edit ,
197
197
"edit message before committing" ),
198
198
OPT_BOOLEAN (0 , "ff" , & allow_fast_forward ,
199
199
"allow fast-forward (default)" ),
@@ -1287,11 +1287,15 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
1287
1287
merge_remote_util (commit ) &&
1288
1288
merge_remote_util (commit )-> obj &&
1289
1289
merge_remote_util (commit )-> obj -> type == OBJ_TAG ) {
1290
- option_edit = 1 ;
1290
+ if (option_edit < 0 )
1291
+ option_edit = 1 ;
1291
1292
allow_fast_forward = 0 ;
1292
1293
}
1293
1294
}
1294
1295
1296
+ if (option_edit < 0 )
1297
+ option_edit = 0 ;
1298
+
1295
1299
if (!use_strategies ) {
1296
1300
if (!remoteheads -> next )
1297
1301
add_strategies (pull_twohead , DEFAULT_TWOHEAD );
0 commit comments