Code

Merge branch 'jc/merge-sans-branch'
authorJunio C Hamano <gitster@pobox.com>
Sat, 2 Apr 2011 00:57:16 +0000 (17:57 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 2 Apr 2011 00:57:16 +0000 (17:57 -0700)
* jc/merge-sans-branch:
  merge: merge with the default upstream branch without argument
  merge: match the help text with the documentation

Conflicts:
builtin/merge.c

1  2 
Documentation/git-merge.txt
Documentation/merge-config.txt
builtin/merge.c

Simple merge
Simple merge
diff --cc builtin/merge.c
index 1e0bcfd792e4fb550fea8786ff2f84e7925aca86,309bdd4dc7d61d38dc5527dfec8cc5d7eb552097..d54e7ddbb12286beb4f9622864f2eeaa79453d32
@@@ -58,7 -60,7 +60,8 @@@ static int option_renormalize
  static int verbosity;
  static int allow_rerere_auto;
  static int abort_current_merge;
 +static int show_progress = -1;
+ static int default_to_upstream;
  
  static struct strategy all_strategy[] = {
        { "recursive",  DEFAULT_TWOHEAD | NO_TRIVIAL },
@@@ -1025,8 -1016,11 +1060,11 @@@ int cmd_merge(int argc, const char **ar
        }
  
        if (!allow_fast_forward && fast_forward_only)
 -              die("You cannot combine --no-ff with --ff-only.");
 +              die(_("You cannot combine --no-ff with --ff-only."));
  
+       if (!argc && !abort_current_merge && default_to_upstream)
+               argc = setup_with_upstream(&argv);
        if (!argc)
                usage_with_options(builtin_merge_usage,
                        builtin_merge_options);