git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] rev-list: add "--full-objects" flag.
Date: Mon, 11 Jul 2005 09:38:49 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0507110928070.17536@g5.osdl.org> (raw)
In-Reply-To: <m1irzh74m0.fsf@ebiederm.dsl.xmission.com>



On Mon, 11 Jul 2005, Eric W. Biederman wrote:
> 
> I guess I was expecting to pull from one tree into another unrelated
> tree.  Getting a tree with two heads and then be able to merge them
> together.

You can do it, but you have to do it by hand. It's a valid operation, but 
it's not an operation I want people to do by mistake, so it's not 
something the trivial helper scripts help with.

The way to do it by hand is to just use something stupid that doesn't
understand what it's doing anyway, and just copy the files over. "cp -a" 
or "rsync" works fine. Then just do "git resolve" by hand. It's not very 
hard at all, but it's definitely something that should be a special case.

> A couple of questions.
> 
> 1) Does git-clone-script when packed copy the entire repository
>    or just take a couple of slices of the tree where you have
>    references?

It only gets the objects needed for the references, nothing more.

So if you only get one branch, it will leave the objects that are specific 
to other branches alone.

> 2) Is there a way for a pack to create deltas against objects
>    that are not in the tree?  For a dumb repository making incremental
>    changes this is ideal.

A pack can only have deltas against objects in that pack. It caan't even 
have deltas to other objects in the same tree, it literally is only 
_within_ a pack. This is so that each pack is totally independent: you can 
always unpack (and verify) the objects in a pack _without_ having anything 
else (of course, the end result is often not a full project, and you won't 
have any references, but at least the _objects_ are valid).

I don't want to have deltas to outside the pack, because while it's 
obviously very nice from a size packing standpoint, it's totally horrid 
from an infrastructure standpoint. It would make it possible to have 
circular dependencies (ie deltas against each other) that could only be 
resolved by having a third pack (or the unpacked object).

It would also means that you may have to have two packs mapped at the same
time to unpack them, which was very much against what I was aiming for: I
think that in the long run, for truly huge projects, you'd want to have a
history of packs, each maybe a gigabyte in size, and you may be in the 
situation that you simply cannot have two packs mapped at the same time 
because you don't have enough virtual memory for it.

So then inter-pack deltas would mean that you'd have to have "partial pack 
mapping" etc horrid special case logic. Right now, because a pack is 
always self-sufficient, you know that in order to unpack an object, if you 
find it in the index file, you will be able to unpack it by just mapping 
that pack and going off..

So the rule is: don't pack too often. The unpacked objects are actually 
working really really well as long as you don't have tens of thousands of 
them. Having a few hundred (or even a few thousand) unpacked objects is 
not a problem at all. Then you do a "git repack" when it starts getting 
uncomfortable, and you you continue.

			Linus

  reply	other threads:[~2005-07-11 17:05 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-03 23:46 [ANNOUNCE] Cogito-0.12 Petr Baudis
2005-07-06 12:01 ` Brian Gerst
2005-07-07 14:45   ` Petr Baudis
2005-07-07 17:21     ` Junio C Hamano
2005-07-07 19:04       ` Linus Torvalds
2005-07-07 19:57         ` Junio C Hamano
2005-07-07 21:58           ` Linus Torvalds
2005-07-07 22:10             ` Junio C Hamano
2005-07-07 20:00         ` Junio C Hamano
2005-07-07 21:29         ` Eric W. Biederman
2005-07-07 22:23           ` Linus Torvalds
2005-07-08  2:11             ` Eric W. Biederman
2005-07-08  1:54           ` Dumb servers (was: [ANNOUNCE] Cogito-0.12) Kevin Smith
2005-07-08  2:27             ` Linus Torvalds
2005-07-07 22:14         ` [ANNOUNCE] Cogito-0.12 Petr Baudis
2005-07-07 22:52           ` Linus Torvalds
2005-07-07 23:16             ` [PATCH] Pull efficiently from a dumb git store Junio C Hamano
2005-07-07 23:50               ` [PATCH] rev-list: add "--objects=self-sufficient" flag Junio C Hamano
2005-07-07 23:58                 ` Linus Torvalds
2005-07-08  1:02                   ` [PATCH] rev-list: add "--full-objects" flag Junio C Hamano
2005-07-08  1:33                     ` Linus Torvalds
2005-07-08  1:46                     ` Linus Torvalds
2005-07-08  2:17                       ` Junio C Hamano
2005-07-08  2:39                         ` Linus Torvalds
2005-07-09 21:09                           ` Eric W. Biederman
2005-07-10  5:11                             ` Linus Torvalds
2005-07-10  6:28                               ` Junio C Hamano
2005-07-10 21:48                             ` Sven Verdoolaege
2005-07-10 22:36                             ` Linus Torvalds
2005-07-11 15:19                               ` Eric W. Biederman
2005-07-11 16:38                                 ` Linus Torvalds [this message]
2005-07-12  0:44                                   ` Eric W. Biederman
2005-07-12  1:14                                     ` Linus Torvalds
2005-07-12  2:38                                       ` Eric W. Biederman
2005-07-12  3:21                                         ` Linus Torvalds
2005-07-12  3:39                                           ` Eric W. Biederman
2005-07-12  4:48                                             ` Linus Torvalds
2005-07-11 17:53                                 ` Linus Torvalds
     [not found]                           ` <7vy88gzn6s.fsf@assigned-by-dhcp.cox.net>
     [not found]                             ` <Pine.LNX.4.58.0507082109140.17536@g5.osdl.org>
     [not found]                               ` <7vfyumj8hn.fsf_-_@assigned-by-dhcp.cox.net>
2005-07-11  7:00                                 ` [PATCH] Check packs and then files Junio C Hamano
2005-07-08  1:03                   ` [PATCH] Give --full-objects flag to rev-list when preparing a dumb server Junio C Hamano
2005-07-07 23:50               ` [PATCH] Use --objects=self-sufficient flag to rev-list Junio C Hamano
2005-07-07 23:52             ` [ANNOUNCE] Cogito-0.12 Tony Luck
2005-07-07 23:54               ` Junio C Hamano
2005-07-07 23:59               ` Linus Torvalds
2005-07-08  0:09                 ` Tony Luck
2005-07-08  0:23                   ` Linus Torvalds
2005-07-09 21:58                     ` Russell King
2005-07-09 22:29                       ` Russell King
2005-07-09 23:46                         ` Junio C Hamano
2005-07-10  5:02                           ` Linus Torvalds
2005-07-10  5:15                             ` Linus Torvalds
2005-07-10  6:55                               ` Russell King
2005-07-10  7:15                                 ` Junio C Hamano
2005-07-10 12:46                                   ` Russell King
2005-07-10 16:51                                     ` Linus Torvalds
2005-07-10 19:15                                       ` Russell King
2005-07-10 20:03                                         ` Linus Torvalds
2005-07-10 20:32                                           ` Russell King
2005-07-10 21:40                                             ` Linus Torvalds
2005-07-10  8:09                       ` Russell King
2005-07-10 14:59                         ` Petr Baudis
2005-07-11 20:30                           ` Chris Wright
2005-07-08  0:09                 ` Linus Torvalds
2005-07-08  8:14                   ` Petr Baudis
2005-07-08 15:56                     ` Daniel Barkalow
2005-07-07  6:22 ` Chris Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0507110928070.17536@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).