提交 76bf488e 编写于 作者: J Junio C Hamano

Do not misidentify "git merge foo HEAD" as an old-style invocation

This was misinterpreted as an ancient style "git merge <message> HEAD
<commit> <commit>..." that merges one (or more) <commit> into the current
branch and record the resulting commit with the given message.  Then a
later sanity check found that there is no <commit> specified and gave
a usage message.
Tested-by: NNanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 af6fbf9f
...@@ -792,7 +792,7 @@ static int suggest_conflicts(void) ...@@ -792,7 +792,7 @@ static int suggest_conflicts(void)
static struct commit *is_old_style_invocation(int argc, const char **argv) static struct commit *is_old_style_invocation(int argc, const char **argv)
{ {
struct commit *second_token = NULL; struct commit *second_token = NULL;
if (argc > 1) { if (argc > 2) {
unsigned char second_sha1[20]; unsigned char second_sha1[20];
if (get_sha1(argv[1], second_sha1)) if (get_sha1(argv[1], second_sha1))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册