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

Re: Help with sparse checkouts

From
Duy Nguyen <pclouds@gmail.com>
Date
Aug 13, 2013, 06:07 UTC
Message-ID
<CACsJy8B8T=DvR4DcXgjvqTX2HvUGDY140JtiQdrv=JwRt_DCrQ@mail.gmail.com>
In-Reply-To
<6658365.507831376332071042.JavaMail.root@zimbra>
On Tue, Aug 13, 2013 at 1:27 AM, Ari Entlich <atrigent@ccs.neu.edu> wrote:
Show 12 quoted lines
> Hello all!
>
> At my current workplace, I have a git-svn repository which has an extremely large working directory. I did not use the --stdlayout option in this clone, so I have a number of branches in my working directory which duplicate large amounts of trunk. There is a particularly large subdirectory which has now been copied to branches four times (and hence shows up in my working directory 5 times). This directory and its copies are making up the vast majority of the files and storage space in my working directory. Furthermore, I do not need or want to have access to the data in these particular directories. Hence, I would like to use the sparse checkouts feature to exclude them from my working directory.
>
> Let's say that these directories are all called "thedir". What I would like to do with the sparse checkouts feature is to simply ignore directories with this name anywhere in the working tree. Intuitively, it seems like I should be able to put:
>
> !thedir
>
> or possibly
>
> !thedir/
>
I think this should work (but I haven't tested it)

/ !thedir

The first rule is to include all, the we exclude what we don't want using the second one (trailing slash or not is ok).

Show 11 quoted lines
> in the sparse-checkout file, but these don't seem to work. I've tried a number of other things, but I always seem to either get the "sparse checkout leaves no entry on working directory" error or no effect at all. In the end, I basically just don't really understand how this file is supposed to work, so I'd rather get some expert help here rather than thrashing about randomly. I realize that sparse checkouts is usually used to select a specific directory rather than what I'm trying to do, so I accept that what I want may simply not be possible with the current implementation. I've asked on IRC, but I wanted to ask here also since it seemed that most of the people I talked to weren't that familiar with the sparse checkouts feature.
>
> Note that, while using --stdlayout would mitigate the massive working directory somewhat, I would still probably want to exclude this directory from my worktree. I will probably do a reclone at some point and use --stdlayout, but I will still want to exclude this particular directory even at that point. I had a lot of people on IRC telling me to just use --stdlayout, which was a good suggestion, but didn't fully fulfill my needs.
>
> Thanks!
>
> Ari
> --
> 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
-- 
Duy
Previous: Ari Entlich
Message 2 of 2 in “Help with sparse checkouts”
  1. Ari EntlichAug 12, 2013
  2. Duy NguyenAug 13, 2013

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.