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

Re: heads-up: git-index-pack in "next" is broken

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:44

Nicolas Pitre [off-list ref] writes:
quoted
but if somebody did so then it would mean a disaster to have an 
accidental collision of an 8-byte offset value plus 12-byte traiing 
NUL and another base object whose object name happens to match that 
pattern.
Not really.  The only effect that would have on the sorted list of 
delta entries -- such sorting used to bring all deltas with the same 
base object contigously -- is that those deltas might not be perfectly 
contigous wrt their base object.  This is why there is a test to skip 
deltas if they happen not to be of the expected type.
Ah, I misread the code that uses union actually checks the type
in struct delta_entry (which embeds the union).  There won't be
any collision problem and you support both types at the same
time just fine.

And your patch to compare only the first 20-bytes makes sense
(assuming ulong is always shorter than 20-bytes which I think is
safe to assume).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help