git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: A Large Angry SCM <gitzilla@gmail.com>
To: git@vger.kernel.org
Subject: Notes on supporting Git operations in/on partial Working Directories
Date: Thu, 14 Sep 2006 12:05:16 -0700	[thread overview]
Message-ID: <4509A7EC.9090805@gmail.com> (raw)

Notes on supporting Git operations in/on partial Working Directories
====================================================================

Motivation
----------
Be able to checkout only part of a tree, do some work, and commit the
changes. Support for partial working directories is also (almost) a
requirement for supporting partial repositories.


Expectations
------------
All Git commands that currently work with the index or the working
directory will work with indexes or working directories that are partial
checkouts.

Leading directories common to all objects of a partial checkout are not
present in the working directory.

The contents of a partial working directory can be determined on an path
by path basis; entire directories are not required.


Implementation Sketch
---------------------
The minimum required changes[*1*][*2*][*3*] to the index file to support
partial checkouts are:

1) the addition of WD_Prefix string to hold the common path prefix of
all objects in the working directory. For a full checkout, the WD_Prefix
string would be empty.

2) A (new) flag for each entry in the index indicating whether or not
the object is in the partial checkout.

The contents of the index file still reflect the full tree but flag each
object (file or symlink) separately as part of the checkout or not. The
WD_Prefix string is so that a partial checkout consisting of only
objects somewhere in the a/b/c/d/ tree can be found in the working
directory without the a/b/c/d/ prefix to the path of the object.

All the Git commands that use the index file will need to be changed to
support this but the transfer protocols do not need to change.


Notes
-----
[*1*] As long as the index file structure is being changed, it may be
worth while also including the ideas in:
	http://www.gelato.unsw.edu.au/archives/git/0601/15471.html
	http://www.gelato.unsw.edu.au/archives/git/0601/15483.html
	http://www.gelato.unsw.edu.au/archives/git/0601/15484.html
Except for the "bind" parts since I still think that is a bad idea.

[*2*] The index "TREE" (cache-tree) extension should also become a
required part of the index.

[*3*] Possibly split the index up by directory and store the parts in
the working directory. An index "distributed" in this way would have
a "natural" cache-tree built in and (finally) be able support empty
directories.

             reply	other threads:[~2006-09-14 19:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-14 19:05 A Large Angry SCM [this message]
2006-09-14 19:21 ` Notes on supporting Git operations in/on partial Working Directories Shawn Pearce
2006-09-14 20:08   ` A Large Angry SCM
2006-09-14 19:50 ` Junio C Hamano
2006-09-14 20:19   ` A Large Angry SCM
2006-09-15  2:43     ` Junio C Hamano
2006-09-15 18:15       ` A Large Angry SCM
2006-09-17 10:43         ` Junio C Hamano
2006-09-17 18:47           ` A Large Angry SCM
2006-09-17 18:55             ` Jakub Narebski
2006-09-17 20:01               ` A Large Angry SCM
2006-09-17 20:28                 ` Jakub Narebski
2006-09-17 21:11                   ` A Large Angry SCM

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=4509A7EC.9090805@gmail.com \
    --to=gitzilla@gmail.com \
    --cc=git@vger.kernel.org \
    /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).