From: Junio C Hamano <junkio@cox.net>
To: "Jon Smirl" <jonsmirl@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Mozilla version control requirements and git
Date: Sun, 03 Sep 2006 16:06:09 -0700 [thread overview]
Message-ID: <7v3bb8tuse.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <9e4733910609022029q9cb9ba9m87cbc37e8d6f4ad7@mail.gmail.com> (Jon Smirl's message of "Sat, 2 Sep 2006 23:29:23 -0400")
"Jon Smirl" <jonsmirl@gmail.com> writes:
> Partial repo pulls and an issue to. The mozilla repo has much more
> than a browser in it, it also has a large mail/news program. A partial
> repo pull may not be what is needed for git, instead git needs a
> partial repo checkout.
That does not contradict with the underlying data model of git,
and it would certainly be possible with a specialized Porcelain.
Since git tracks the entire tree, the tree object contained in
the commit you create _must_ describe the entire project tree,
but that does not necessarily mean that your working tree needs
to have the entire tree checked out.
The git corelevel is designed to be operable with sparsely
populated working tree, and the problem you are seeing is
primarily coming from the fact that some wrappers you are seeing
as "git UI" are specifically done to help workflows that _wants_
to have fully populated working tree (e.g. "git commit -a" and
"git checkout"). There are other wrappers that are designed to
work well in sparsely populated working tree, including "git-am"
and "git-merge". They should be usable pretty much as they are.
To support "narrow checkout" workflow, some wrappers either need
to be told about the "interesting area", or a set of different
wrappers specifically designed to support "narrow checkout"
workflow can be written. I am not sure which is more desirable.
I have a gut feeling that "git commit" can be used as is (you cd
into the area you are interested in, and say "git commit ."
instead of saying "git commit -a"), while it would be less
confusing to keep "git checkout" the whole-tree operation and
have a specialized porcelain for a narrow checkout, but this is
me saying things without thinking things through.
I imagine such a "narrow checkout" workflow Porcelain would work
like this:
- the user tells it which parts of the whole project she is
interested in.
- when checking things out, the Porcelain populates the index
in full [*1*] and then checks out only specified subtrees to
the working tree.
- when checking things in, the changes outside the specified
area are ignored (well, outside there should be no files in
working tree so ignoring them should be trivial). write-tree
writes from the whole index and creates the tree object and
then commit object just as usual. The net effect is that the
parts outside the areas of interest stay the same as the
previous HEAD commit, which is exactly what the user wanted
anyway.
You could optimize the above further by populating the index
sparsely as well (i.e. *1* above is not a requirement), but you
would need to merge in the changes made to that sparse index
into the full tree read from the HEAD commit before writing the
next tree object out anyway, so I doubt it is worth it.
--
VGER BF report: U 0.842228
prev parent reply other threads:[~2006-09-03 23:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-02 14:31 Mozilla version control requirements and git Jon Smirl
2006-09-03 1:19 ` Martin Langhoff
2006-09-03 3:29 ` Jon Smirl
2006-09-03 9:17 ` Jakub Narebski
2006-09-03 13:46 ` Jon Smirl
2006-09-03 15:42 ` Jakub Narebski
2006-09-03 21:40 ` Martin Langhoff
2006-09-04 1:43 ` Jon Smirl
2006-09-03 23:06 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v3bb8tuse.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=jonsmirl@gmail.com \
/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.
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 NNTP newsgroup(s).