summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-12-02 09:59:35 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-12-02 10:01:59 -0800
commit76bf488e61b8a87191a1779b79820545e64ef275 (patch)
tree182ca04d19ef735865aab0f9c075020c0b4a7b1d
parenthelp: Do not unnecessarily look for a repository (diff)
downloadtgif-76bf488e61b8a87191a1779b79820545e64ef275.tar.xz
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: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin-merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-merge.c b/builtin-merge.c
index e95c5dc717..e5cf795307 100644
--- a/builtin-merge.c
+++ b/builtin-merge.c
@@ -792,7 +792,7 @@ static int suggest_conflicts(void)
static struct commit *is_old_style_invocation(int argc, const char **argv)
{
struct commit *second_token = NULL;
- if (argc > 1) {
+ if (argc > 2) {
unsigned char second_sha1[20];
if (get_sha1(argv[1], second_sha1))