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

Re: Sparse checkout in worktree

From
Duy Nguyen <pclouds@gmail.com>
Date
Nov 25, 2015, 20:17 UTC
Message-ID
<CACsJy8BGPk7C3d9JWjRwYrgh4OTUiiAjGzcKcRJy8+-5=x8=Pg@mail.gmail.com>
In-Reply-To
<56560FAE.3000605@drmicha.warpmail.net>

On Wed, Nov 25, 2015 at 8:44 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

Show 16 quoted lines
> Duy Nguyen venit, vidit, dixit 25.11.2015 20:38:
>> On Wed, Nov 25, 2015 at 1:40 PM, Michael J Gruber
>> <git@drmicha.warpmail.net> wrote:
>>> Hi there,
>>>
>>> I'm wondering how much it would take to enable worktree specific sparse
>>> checkouts. From a superfluous look:
>>>
>>> - $GIT_DIR/info/sparse_checkout needs to be worktree specific
>>
>> It already is.
>
> But where should I put the worktree specific sparse_checkout file? Is
> Documentation/technical really the only place to find information about
> this? And to make the existing tree sparse, do I need to rm -r and
> checkout sparsely?

Ahh.. worktree-specific files of the checkout "foo" stay in $GIT_DIR/repos/foo. So sparse-checkout path should be $GIT_DIR/repos/foo/info/sparse-checkout. This is another good reason to add 'git checkout --edit-sparse' that opens the sparse-checkout file for you to update. Or you could use 'git rev-parse --git-path info/sparse-checkout" to get full path.

-- 
Duy
Previous: Michael J GruberNext: Michael J Gruber
Message 4 of 6 in “Sparse checkout in worktree”
  1. Michael J GruberNov 25, 2015
  2. Duy NguyenNov 25, 2015
  3. Michael J GruberNov 25, 2015
  4. Duy NguyenNov 25, 2015
  5. Michael J GruberNov 25, 2015
  6. Duy NguyenNov 25, 2015

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.