summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-05 15:24:12 -0800
committerJunio C Hamano <gitster@pobox.com>2011-12-05 15:24:14 -0800
commitce8781e8ab66fb90fb7baf8d953a4582a06571a7 (patch)
tree85d3248a398a4549dc8ca8d00ad36bf94bdf4a6c /builtin/merge.c
parentcddec4f8aea4809131dc1b1765d6c8e2a498a58e (diff)
parent5480207c4ee395fbb82682bc2065c93a43e24328 (diff)
downloadgit-ce8781e8ab66fb90fb7baf8d953a4582a06571a7.tar.gz
Merge branch 'vr/git-merge-default-to-upstream'
* vr/git-merge-default-to-upstream: Show error for 'git merge' with unset merge.defaultToUpstream
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 2870a6af6f..1712b93e45 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1169,9 +1169,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
die(_("You cannot combine --no-ff with --ff-only."));
if (!abort_current_merge) {
- if (!argc && default_to_upstream)
- argc = setup_with_upstream(&argv);
- else if (argc == 1 && !strcmp(argv[0], "-"))
+ if (!argc) {
+ if (default_to_upstream)
+ argc = setup_with_upstream(&argv);
+ else
+ die(_("No commit specified and merge.defaultToUpstream not set."));
+ } else if (argc == 1 && !strcmp(argv[0], "-"))
argv[0] = "@{-1}";
}
if (!argc)