mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
Revert recent "git merge <msg> HEAD <commit>..." deprecation
This reverts commitc0ecb07048
"git-pull.sh: Fix call to git-merge for new command format" and commitb81e00a965
"git-merge: a deprecation notice of the ancient command line syntax". They caused a "git pull" (without any arguments, and without any local commits---only to update to the other side) to warn that commit log message is ignored because the merge resulted in a fast-forward. Another possible solution is to add an extra option to "git merge" so that "git pull" can tell it that the message given is not coming from the end user (the canned message is passed just in case the merge resulted in a non-ff and caused commit), but I think it is easier _not_ to deprecate the old syntax. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
f9ad77a739
commit
77c29b4aca
@ -796,11 +796,6 @@ static int suggest_conflicts(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const char deprecation_warning[] =
|
||||
"'git merge <msg> HEAD <commit>' is deprecated. Please update\n"
|
||||
"your script to use 'git merge -m <msg> <commit>' instead.\n"
|
||||
"In future versions of git, this syntax will be removed.";
|
||||
|
||||
static struct commit *is_old_style_invocation(int argc, const char **argv)
|
||||
{
|
||||
struct commit *second_token = NULL;
|
||||
@ -814,7 +809,6 @@ static struct commit *is_old_style_invocation(int argc, const char **argv)
|
||||
die("'%s' is not a commit", argv[1]);
|
||||
if (hashcmp(second_token->object.sha1, head))
|
||||
return NULL;
|
||||
warning(deprecation_warning);
|
||||
}
|
||||
return second_token;
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ fi
|
||||
|
||||
merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
|
||||
test true = "$rebase" &&
|
||||
exec git rebase $diffstat $strategy_args --onto $merge_head \
|
||||
exec git-rebase $diffstat $strategy_args --onto $merge_head \
|
||||
${oldremoteref:-$merge_head}
|
||||
exec git merge $verbosity $diffstat $no_commit $squash $no_ff $ff_only $log_arg $strategy_args \
|
||||
-m "$merge_name" $merge_head
|
||||
exec git-merge $diffstat $no_commit $squash $no_ff $ff_only $log_arg $strategy_args \
|
||||
"$merge_name" HEAD $merge_head $verbosity
|
||||
|
Loading…
Reference in New Issue
Block a user