summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2014-04-20 19:17:33 -0500
committerJunio C Hamano <gitster@pobox.com>2014-04-22 12:53:59 -0700
commita01f7f2ba0e73ffbee0fa1ec9a5a78f276cc173d (patch)
tree85511431579f68ce408f37e6cc35a6e1fe154876
parent779792a5f24bb4e8049c4f88ad752e70d4a8a080 (diff)
downloadgit-fc/merge-default-to-upstream.tar.gz
merge: enable defaulttoupstream by defaultfc/merge-default-to-upstream
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>
-rw-r--r--Documentation/git-merge.txt5
-rw-r--r--builtin/merge.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index a3c1fa332a..cf2c374b71 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -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.
diff --git a/builtin/merge.c b/builtin/merge.c
index 66d8843301..1fc9319d8f 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -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[] = {