Thread (64 messages) 64 messages, 7 authors, 2024-11-27

Re: [PATCH v2 03/10] midx-write: use `revs->repo` inside `read_refs_snapshot`

From: Taylor Blau <hidden>
Date: 2024-11-20 19:44:31

On Tue, Nov 19, 2024 at 04:36:42PM +0100, Karthik Nayak wrote:
quoted hunk ↗ jump to hunk
---
 midx-write.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/midx-write.c b/midx-write.c
index 22b5233f51ec6c6d99b8f9613818f1581dca5982..564438f616f59cd24edda956e4af0e0acf167138 100644
--- a/midx-write.c
+++ b/midx-write.c
@@ -760,7 +760,7 @@ static int read_refs_snapshot(const char *refs_snapshot,
 			hex = &buf.buf[1];
 		}

-		if (parse_oid_hex(hex, &oid, &end) < 0)
+		if (parse_oid_hex_algop(hex, &oid, &end, revs->repo->hash_algo) < 0)
Looks obviously correct.
quoted hunk ↗ jump to hunk
 			die(_("could not parse line: %s"), buf.buf);
 		if (*end)
 			die(_("malformed line: %s"), buf.buf);
@@ -776,6 +776,7 @@ static int read_refs_snapshot(const char *refs_snapshot,
 	strbuf_release(&buf);
 	return 0;
 }
+
Good spotting :-).

Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help