Re: If you would write git from scratch now, what would you change?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nicolas Pitre <nico@...>
Cc: Shawn O. Pearce <spearce@...>, Jakub Narebski <jnareb@...>, <git@...>, <danahow@...>
Date: Tuesday, November 27, 2007 - 1:59 am

On Nov 26, 2007 8:58 PM, Nicolas Pitre <nico@cam.org> wrote:

Yes,  now I remember: this was the same argument you used to
convince me that losing the "new" (deprecated) loose format was OK.

However,  if we changed
WRITE(DEFLATE(SHA1("$type $size\0$data")))
(where SHA1(x) = x but has the side-effect of updating the SHA-1)
to
WRITE($pack_style_object_header)
SHA1("$type $size\0")
WRITE(DEFLATE(SHA1($data)))
then the SHA-1 result is the same but we get the pack-style header,
and blobs can be sucked straight into packs when not deltified.
The SHA-1 result is still usable at the end to rename the temporary
loose object file
(and put it in the correct xx subdirectory).

Because we can't change the SHA-1 result we unfortunately can
never drop the 2nd call above [this is something that could
have been different, to respond to the email that started this thread].
You didn't like the duplication between the 1st and 2nd call,
but I can't say I see that as a big deal.

Not exactly.  I did think about this.  When you are packing to stdout,
and only sending the resulting packfile locally,  you don't want to
bother with recompressing everything.  [This is the "workgroup" case
that concerns me.]  Other cases,  sure,
recompression could help (e.g., packing to a file means the file
will probably be around for a while,  so you want to recompress
if the levels are unequal;  and you probably want to recompress
as well if the packfile will be sent over a "slow" link).

Thanks,
-- 
Dana L. How  danahow@gmail.com  +1 650 804 5991 cell
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: If you would write git from scratch now, what would you ..., Dana How, (Tue Nov 27, 1:59 am)
C# binding, was Re: If you would write git from scratch now,..., Johannes Schindelin, (Tue Nov 27, 7:47 am)
Re: If you would write git from scratch now, what would you ..., Andreas Ericsson, (Tue Nov 27, 10:11 am)
Re: If you would write git from scratch now, what would you ..., Johannes Schindelin, (Mon Nov 26, 5:27 pm)
Re: If you would write git from scratch now, what would you ..., Johannes Schindelin, (Mon Nov 26, 5:40 pm)