[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Git internal format and compatibilty



Raphael Hertzog wrote:
> The version of the software called "git" (we have nothing better to
> identify the internal format AFAIK).
> 
> If the internal format changes, I expect that git will upgrade it in place
> or something similar. However a source package published in a given
> release is a git repository that nobody use and will thus never be
> upgraded to a newer format. And after some time, we'll have lost the
> ability to extract older source packages.

In several ways, that doesn't make much sense. There's also some
inaverdant FUD going on here. Here is the actual situation, as I
understand it.

Neither gzip nor tar files include an embedded version number and yet
the tar format has several times been extended without breaking
backwards compatability. The family of zip/compress formats is a mess
and yet current gzip can extract every zip-like thing ever created. In a
sense that's what "file format" means today -- even if the format
changes, old versions are still supported[1].

By contrast to old formats like tar, the git pack (and idx) formats _do_
contain a version number. Three versions exist: Version 1 was never
broadly used. ("Throw one away".) Version 3 is not generated by current
versions of git. Git might start generating it at some point in the future,
but has already supported reading it since 2006 -- a positively
Debianish update schedule. Version 2 is what everyone uses now.

I'm confident that the current git object format will be supported as
long as git exists. Changing that format and doing the "upgrade in
place" you suggest git might do would change every sha1 in the git
repository, breaking all references to the sha1s, including all signed
tags, and all cloned repositories. New object file formats might be
developed, but existing ones will always have to be supported going
forward.

Just because the git pack, idx, and object are relatively new file
formats to tar or gz is not a reason to fear them changing in
incompatible ways.

-- 
see shy jo

[1] Doesn't dpkg even support all the old variants of the deb format?

Attachment: signature.asc
Description: Digital signature


Reply to: