Merge branch 'fc/merge-default-to-upstream'
authorJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2014 19:06:43 +0000 (12:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2014 19:06:43 +0000 (12:06 -0700)
"git merge" without argument, even when there is an upstream
defined for the current branch, refused to run until
merge.defaultToUpstream is set to true. Flip the default of that
configuration variable to true.

* fc/merge-default-to-upstream:
merge: enable defaulttoupstream by default

1  2 
builtin/merge.c
diff --combined builtin/merge.c
index 7c9d8f2432903eba41e457d4b451ab6b928703a0,1fc9319d8f06f27722c371d1b76d94584466dd3a..428ca247bd17e0f18776b46d40a09282b0b955de
@@@ -63,7 -63,7 +63,7 @@@ static int verbosity
  static int allow_rerere_auto;
  static int abort_current_merge;
  static int show_progress = -1;
- static int default_to_upstream;
+ static int default_to_upstream = 1;
  static const char *sign_commit;
  
  static struct strategy all_strategy[] = {
@@@ -398,7 -398,7 +398,7 @@@ static void finish(struct commit *head_
                        const char *argv_gc_auto[] = { "gc", "--auto", NULL };
                        update_ref(reflog_message.buf, "HEAD",
                                new_head, head, 0,
 -                              DIE_ON_ERR);
 +                              UPDATE_REFS_DIE_ON_ERR);
                        /*
                         * We ignore errors in 'gc --auto', since the
                         * user should see them.
@@@ -1222,7 -1222,7 +1222,7 @@@ int cmd_merge(int argc, const char **ar
                        die(_("%s - not something we can merge"), argv[0]);
                read_empty(remote_head->object.sha1, 0);
                update_ref("initial pull", "HEAD", remote_head->object.sha1,
 -                         NULL, 0, DIE_ON_ERR);
 +                         NULL, 0, UPDATE_REFS_DIE_ON_ERR);
                goto done;
        } else {
                struct strbuf merge_names = STRBUF_INIT;
        }
  
        update_ref("updating ORIG_HEAD", "ORIG_HEAD", head_commit->object.sha1,
 -                 NULL, 0, DIE_ON_ERR);
 +                 NULL, 0, UPDATE_REFS_DIE_ON_ERR);
  
        if (remoteheads && !common)
                ; /* No common ancestors found. We need a real merge. */