Skip to content

Commit 77c29b4

Browse files
committed
Revert recent "git merge <msg> HEAD <commit>..." deprecation
This reverts commit c0ecb07 "git-pull.sh: Fix call to git-merge for new command format" and commit b81e00a "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 <[email protected]>
1 parent f9ad77a commit 77c29b4

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

builtin-merge.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -796,11 +796,6 @@ static int suggest_conflicts(void)
796796
return 1;
797797
}
798798

799-
static const char deprecation_warning[] =
800-
"'git merge <msg> HEAD <commit>' is deprecated. Please update\n"
801-
"your script to use 'git merge -m <msg> <commit>' instead.\n"
802-
"In future versions of git, this syntax will be removed.";
803-
804799
static struct commit *is_old_style_invocation(int argc, const char **argv)
805800
{
806801
struct commit *second_token = NULL;
@@ -814,7 +809,6 @@ static struct commit *is_old_style_invocation(int argc, const char **argv)
814809
die("'%s' is not a commit", argv[1]);
815810
if (hashcmp(second_token->object.sha1, head))
816811
return NULL;
817-
warning(deprecation_warning);
818812
}
819813
return second_token;
820814
}

git-pull.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ fi
216216

217217
merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
218218
test true = "$rebase" &&
219-
exec git rebase $diffstat $strategy_args --onto $merge_head \
219+
exec git-rebase $diffstat $strategy_args --onto $merge_head \
220220
${oldremoteref:-$merge_head}
221-
exec git merge $verbosity $diffstat $no_commit $squash $no_ff $ff_only $log_arg $strategy_args \
222-
-m "$merge_name" $merge_head
221+
exec git-merge $diffstat $no_commit $squash $no_ff $ff_only $log_arg $strategy_args \
222+
"$merge_name" HEAD $merge_head $verbosity

0 commit comments

Comments
 (0)