Merge branch 'vr/git-merge-default-to-upstream'
* vr/git-merge-default-to-upstream: Show error for 'git merge' with unset merge.defaultToUpstream
This commit is contained in:
commit
ce8781e8ab
@ -1169,9 +1169,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
|
|||||||
die(_("You cannot combine --no-ff with --ff-only."));
|
die(_("You cannot combine --no-ff with --ff-only."));
|
||||||
|
|
||||||
if (!abort_current_merge) {
|
if (!abort_current_merge) {
|
||||||
if (!argc && default_to_upstream)
|
if (!argc) {
|
||||||
argc = setup_with_upstream(&argv);
|
if (default_to_upstream)
|
||||||
else if (argc == 1 && !strcmp(argv[0], "-"))
|
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}";
|
argv[0] = "@{-1}";
|
||||||
}
|
}
|
||||||
if (!argc)
|
if (!argc)
|
||||||
|
Loading…
Reference in New Issue
Block a user