]> git.ipfire.org Git - thirdparty/git.git/commitdiff
helper/test-ref-store: fix "new-sha1" vs "old-sha1" typo
authorChristian Couder <christian.couder@gmail.com>
Sun, 6 Jan 2019 15:46:37 +0000 (16:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Jan 2019 18:55:03 +0000 (10:55 -0800)
It looks like it is a copy-paste error  made in 80f2a6097c
(t/helper: add test-ref-store to test ref-store functions,
2017-03-26) to pass "old-sha1" instead of "new-sha1" to
notnull() when we get the new sha1 argument from
const char **argv.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Acked-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-ref-store.c

index 2d84c45ffe99d1d5430345a32d1386804c3c495d..862331c029f31b7771eaf5161d07fb90965655a3 100644 (file)
@@ -211,7 +211,7 @@ static int cmd_update_ref(struct ref_store *refs, const char **argv)
 {
        const char *msg = notnull(*argv++, "msg");
        const char *refname = notnull(*argv++, "refname");
-       const char *new_sha1_buf = notnull(*argv++, "old-sha1");
+       const char *new_sha1_buf = notnull(*argv++, "new-sha1");
        const char *old_sha1_buf = notnull(*argv++, "old-sha1");
        unsigned int flags = arg_flags(*argv++, "flags");
        unsigned char old_sha1[20];