git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 00/12] Sparse checkout

From
JPJames Pickens <jepicken@gmail.com>
Date
Jul 24, 2008, 08:24 UTC
Message-ID
<loom.20080724T065737-580@post.gmane.org>
In-Reply-To
<20080723145518.GA29035@laptop>
Nguyễn Thái Ngọc Duy <pclouds <at> gmail.com> writes:
Show 9 quoted lines
> I have not looked at non-builtin commands yet, but I think it's not
> a big deal. We have several rounds before this series is good enough ;)
> So in short, sparse prefix will be stored in config, core.sparsecheckout.
> you have three new commands to enter/update/leave sparse checkout:
> 
> git clone --path=prefix       # clone with sparse checkout
> git checkout --path=prefix    # limit/update checkout paths
> git checkout --full           # stop sparse checkout
>

First things first, thanks a lot for working on this feature. I have an enormous project in CVS (144GB repo, containing 65000 directories and 463000 files) that I've been wanting to convert to git for a while now, and the lack of sparse checkouts was the only thing about git that was standing in the way. The project is so big that checking out the whole tree all the time is unworkable, and I think my coworkers would hang me if I tried to make them use submodules. We already use sparse checkouts in CVS to make it manageable, so sparse checkout support in git would vastly simplify the transition.

I played around with the patch briefly, and I have a couple of comments on the interface.

First, I would want a capability to checkout a directory non-recursively. I.e., checkout directory A/B, without also checking out directory A/B/C. Perhaps a modifier could be added to a path element to make it non-recursive.

Second, I would want a capability to checkout and release directories incrementally, similar to how we do it in cvs. For example, I might do the following in cvs:

$ cvs co -l A # Checkout dir A non-recursively $ cd A $ cvs up -l -d B1 B2 # Checkout dirs A/B1 and A/B2 non-recursively $ cd B1 $ cvs up -d C1 C2 # Checkout dirs A/B1/C1 and A/B1/C2 recursively (Oops, didn't need C2) $ cvs release -d C2

At this point I would have the following directory tree, assuming the C1 directory in the repo contained a D1 directory:

A/ A/B1/ A/B1/C1/ A/B1/C1/D1/ A/B2/

A similar capability in git would be much appreciated.

Finally, I noticed what I think is a bug: if you do a partial checkout of a non-existing directory, you just get an empty tree. I would expect to get an error message in that case.

I hope this is helpful, and thanks again for working on this.
James
Previous: Nguyen Thai Ngoc DuyNext: Nguyen Thai Ngoc Duy
Message 17 of 27 in “Sparse checkout”
  1. 00/12 Sparse checkoutNguyễn Thái Ngọc Duy, Jul 23, 2008
  2. Nguyen Thai Ngoc DuyJul 23, 2008
  3. Johannes SchindelinJul 23, 2008
  4. Nguyen Thai Ngoc DuyJul 23, 2008
  5. Johannes SchindelinJul 23, 2008
  6. Nguyen Thai Ngoc DuyJul 24, 2008
  7. Johannes SchindelinJul 24, 2008
  8. Nguyen Thai Ngoc DuyJul 24, 2008
  9. Johannes SchindelinJul 24, 2008
  10. Nguyen Thai Ngoc DuyJul 24, 2008
  11. Avery PennarunJul 24, 2008
  12. Johannes SchindelinJul 24, 2008
  13. Nguyen Thai Ngoc DuyJul 24, 2008
  14. Jan HudecAug 3, 2008
  15. Johannes SchindelinAug 3, 2008
  16. Nguyen Thai Ngoc DuyAug 4, 2008
  17. James PickensJul 24, 2008
  18. Nguyen Thai Ngoc DuyJul 24, 2008
  19. James PickensJul 24, 2008
  20. Nguyen Thai Ngoc DuyJul 24, 2008
  21. James PickensJul 24, 2008
  22. Jakub NarebskiJul 24, 2008
  23. Nguyen Thai Ngoc DuyJul 24, 2008
  24. Jakub NarebskiJul 24, 2008
  25. Nguyen Thai Ngoc DuyJul 24, 2008
  26. Avery PennarunJul 25, 2008
  27. Johannes SchindelinJul 25, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.