login
Header Space

 
 

Re: [QUESTION] about .git/info/grafts file

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Franck <vagabon.xyz@...>
Cc: Petr Baudis <pasky@...>, Junio C Hamano <junkio@...>, Git Mailing List <git@...>
Date: Thursday, January 19, 2006 - 1:49 pm

On Thu, 19 Jan 2006, Franck wrote:

I think we'd have to set up the grafts file, yes. However, it's actually 
less of an advantage than you'd think: especially for long development 
histories, the incremental packing is very very efficient. In contrast, if 
you only get recent versions, there's nothing to be incremental against, 
so the size of the pack will not be that much smaller.

So getting just a tenth of the development history will _not_ cause the 
pack to be just a tenth in size. It's probably closer to half the size of 
the full history.

Anyway, it's _conceptually_ something that git wouldn't have any problems 
with, but that doesn't mean that it's totally trivial either. The easiest 
way to do it (by far) would be to expand the native git protocol with a 
"get all objects of this one version" or something like that, and then 
you'd just do a "pull and mark all unknown commits in the grafts file".

So in effect, instead of getting the whole history pack, you'd get a pack 
that contains _one_ version (no history at all), and then (if you want to) 
you can get a pack that gets all stuff that isn't reachable from that one 
(ie "newer").

That would have the advantage that it's quite possible that many users 
might want to do just

	git clone --only=v2.6.15 <source> <target>

which would do that "one single version" variant of the clone. Then, later 
on, you could just do

	git pull --graft-unknown <source> <target>

to update the history.

Anybody want to try that? It would be a new command to "git-daemon" 
(instead of "git-upoload-pack", you'd do a new "git-upload-version" 
command internally: it would look a lot like upload-pack, and use the same 
unpacking protocol).


Well, you really don't need to do that very often.

		Linus
-
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: [QUESTION] about .git/info/grafts file, Junio C Hamano, (Wed Jan 18, 8:40 pm)
Re: [QUESTION] about .git/info/grafts file, Andreas Ericsson, (Thu Jan 19, 7:10 am)
Re: [QUESTION] about .git/info/grafts file, Franck, (Thu Jan 19, 9:31 am)
Re: [QUESTION] about .git/info/grafts file, Andreas Ericsson, (Thu Jan 19, 9:44 am)
Re: [QUESTION] about .git/info/grafts file, Ryan Anderson, (Fri Jan 20, 4:48 pm)
Re: [QUESTION] about .git/info/grafts file, Petr Baudis, (Thu Jan 19, 1:45 pm)
Re: [QUESTION] about .git/info/grafts file, Petr Baudis, (Thu Jan 19, 9:05 am)
Re: [QUESTION] about .git/info/grafts file, Franck, (Thu Jan 19, 6:51 am)
Re: [QUESTION] about .git/info/grafts file, Petr Baudis, (Thu Jan 19, 9:09 am)
Re: [QUESTION] about .git/info/grafts file, Linus Torvalds, (Thu Jan 19, 12:58 pm)
Re: [QUESTION] about .git/info/grafts file, Franck, (Thu Jan 19, 1:33 pm)
Re: [QUESTION] about .git/info/grafts file, Linus Torvalds, (Thu Jan 19, 1:49 pm)
Re: [QUESTION] about .git/info/grafts file, Petr Baudis, (Thu Jan 19, 1:30 pm)
speck-geostationary