Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCHv3 6/6] refs.c: enable large transactions

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:03:41

Stefan Beller [off-list ref] writes:
I do not see the problem in the code itself, but rather in understanding
the code. I will send a follow up patch which makes it easier to follow
by removing the early exit with no problem away.

Taken as a whole the code may function correctly but the division of
roles of individual functions seems screwed up.  write_ref_sha1()
sometimes unlocks, and sometimes leaves the unlocking to the caller,
and the caller cannot even tell if it is expected to do the unlocking
for it from the return value because both cases return 0 (success).

I am not sure if it is sensible to call that "correct but hard to
understand".  I'd rather see us admit that its behaviour is screwey
and needs fixing for better code health longer term.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help