threads / patch / 50164

patchhelper/test-ref-store: fix "new-sha1" vs "old-sha1" typo

Subject: [PATCH] helper/test-ref-store: fix "new-sha1" vs "old-sha1" typo

## tl;dr

4 messages between Jan 6, 2019 and Jan 17, 2019. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Christian Couder· Jan 6, 2019, 15:46 UTC · lore

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>
---
 t/helper/test-ref-store.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/helper/test-ref-store.c +1 −1
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
index e9e0541276..799fc00aa1 100644
--- a/t/helper/test-ref-store.c
+++ b/t/helper/test-ref-store.c
@@ -233,7 +233,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");
 	struct object_id old_oid;
-- 
2.20.1.26.gc246996f60
Duy Nguyen· Jan 7, 2019, 12:53 UTC · re: Christian Couder · lore

Re: [PATCH] helper/test-ref-store: fix "new-sha1" vs "old-sha1" typo

On Sun, Jan 6, 2019 at 10:46 PM Christian Couder <christian.couder@gmail.com> wrote:

Show 6 quoted lines
>
> 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.
Ack. Definitely copy-paste error.
Show 22 quoted lines
>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
>  t/helper/test-ref-store.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
> index e9e0541276..799fc00aa1 100644
> --- a/t/helper/test-ref-store.c
> +++ b/t/helper/test-ref-store.c
> @@ -233,7 +233,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");
>         struct object_id old_oid;
> --
> 2.20.1.26.gc246996f60
>
-- 
Duy
Christian Couder· Jan 16, 2019, 11:13 UTC · re: Duy Nguyen · lore

Re: [PATCH] helper/test-ref-store: fix "new-sha1" vs "old-sha1" typo

On Mon, Jan 7, 2019 at 1:53 PM Duy Nguyen <pclouds@gmail.com> wrote:
Show 11 quoted lines
>
> On Sun, Jan 6, 2019 at 10:46 PM Christian Couder
> <christian.couder@gmail.com> wrote:
> >
> > 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.
>
> Ack. Definitely copy-paste error.
Thanks for confirming.
Junio, it looks like the patch has fallen through the cracks.
Or maybe I should rework the commit message?
Junio C Hamano· Jan 17, 2019, 18:53 UTC · re: Christian Couder · lore

Re: [PATCH] helper/test-ref-store: fix "new-sha1" vs "old-sha1" typo

Christian Couder <christian.couder@gmail.com> writes:
Show 16 quoted lines
> On Mon, Jan 7, 2019 at 1:53 PM Duy Nguyen <pclouds@gmail.com> wrote:
>>
>> On Sun, Jan 6, 2019 at 10:46 PM Christian Couder
>> <christian.couder@gmail.com> wrote:
>> >
>> > 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.
>>
>> Ack. Definitely copy-paste error.
>
> Thanks for confirming.
>
> Junio, it looks like the patch has fallen through the cracks.

Indeed. I did notice two smallish cleanups from you but did not spot this one.

Will take a look and queue.
Thanks.
>
> Or maybe I should rework the commit message?

← back to recent threads