Skip to content

Commit

Permalink
merge: enable defaulttoupstream by default
Browse files Browse the repository at this point in the history
There's no point in this:

% git merge
fatal: No commit specified and merge.defaultToUpstream not set.

We know the most likely scenario is that the user wants to merge the
upstream, and if not, he can set merge.defaultToUpstream to false.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed Apr 22, 2014
1 parent 779792a commit a01f7f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Documentation/git-merge.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@ commit or stash your changes before running 'git merge'.
Specifying more than one commit will create a merge with
more than two parents (affectionately called an Octopus merge).
+
If no commit is given from the command line, and if `merge.defaultToUpstream`
configuration variable is set, merge the remote-tracking branches
that the current branch is configured to use as its upstream.
If no commit is given from the command line, merge the remote-tracking
branches that the current branch is configured to use as its upstream.
See also the configuration section of this manual page.


Expand Down
2 changes: 1 addition & 1 deletion builtin/merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit a01f7f2

Please sign in to comment.