[prev in list] [next in list] [prev in thread] [next in thread]
List: gameoftrees
Subject: Re: got patch: diff3 merge for git diffs
From: Stefan Sperling <stsp () stsp ! name>
Date: 2022-06-27 15:24:31
Message-ID: YrnLr3NMsEIIwhPg () camille ! stsp ! name
[Download RAW message or body]
On Mon, Jun 27, 2022 at 03:01:51PM +0200, Omar Polo wrote:
> > - if (!got_parse_sha1_digest(id.sha1, blobid))
> > - return got_error(GOT_ERR_BAD_OBJ_ID_STR);
> > + if (strlen(blobid) != 40) {
>
> looking at the length of the blobid to judge if it's abbreviated or not
> is fine?
Yes, but please check against SHA1_DIGEST_STRING_LENGTH - 1 instead of 40.
sha1.h:
#define SHA1_DIGEST_STRING_LENGTH (SHA1_DIGEST_LENGTH * 2 + 1)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic