Re: [PATCH 19/21] t/helper: remove dependency on `the_repository` in "oidtree"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 11, 2024 at 11:17:57PM +0000, brian m. carlson wrote:
> On 2024-06-11 at 11:59:01, Patrick Steinhardt wrote:
> > diff --git a/t/helper/test-oidtree.c b/t/helper/test-oidtree.c
> > index c7a1d4c642..04ec24cc84 100644
> > --- a/t/helper/test-oidtree.c
> > +++ b/t/helper/test-oidtree.c
> > @@ -30,7 +27,7 @@ int cmd__oidtree(int argc UNUSED, const char **argv UNUSED)
> >  			algo = oid.algo;
> >  			oidtree_insert(&ot, &oid);
> >  		} else if (skip_prefix(line.buf, "contains ", &arg)) {
> > -			if (get_oid_hex(arg, &oid))
> > +			if (get_oid_hex_any(arg, &oid) == GIT_HASH_UNKNOWN)
> >  				die("contains not a hexadecimal oid: %s", arg);
> 
> This is not a problem in your code, but this might read more naturally
> as "does not contain a hexadecimal oid" or "contains no hexadecimal
> oid".

True. I'll leave this as-is though given that Ghanshyam is already busy
converting this test to be a unit test anyway, so I don't want to make
his life harder here.

Patrick

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux