merge: enable defaulttoupstream by default
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>
Felipe Contreras committed
Apr 20, 2014 at 19:17 UTC
a01f7f2ba0e73ffbee0fa1ec9a5a78f276cc173d
2 files changed
+3
-4
Documentation/git-merge.txt
+2
-3
@@ -101,9 +101,8 @@ commit or stash your changes before running 'git merge'.
101
Specifying more than one commit will create a merge with
102
more than two parents (affectionately called an Octopus merge).
103
+
104
-If no commit is given from the command line, and if `merge.defaultToUpstream`
105
-configuration variable is set, merge the remote-tracking branches
106
-that the current branch is configured to use as its upstream.
104
+If no commit is given from the command line, merge the remote-tracking
105
+branches that the current branch is configured to use as its upstream.
106
See also the configuration section of this manual page.
107
108
builtin/merge.c
+1
-1
@@ -63,7 +63,7 @@ static int verbosity;
63
static int allow_rerere_auto;
64
static int abort_current_merge;
65
static int show_progress = -1;
66
-static int default_to_upstream;
66
+static int default_to_upstream = 1;
67
static const char *sign_commit;
68
69
static struct strategy all_strategy[] = {