Re: Sparse worktree always contains root files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeppe Øland <joland@xxxxxxxxx> writes:

> I'm trying to use sparse checkouts in a large project, and one oddity
> (bug?) came up.
>
> If I do a normal full clone of a repository, then do:
>     git worktree add ../sparse --no-checkout
>     cd ../sparse
>     git sparse-checkout set somepath
>     git checkout
> Now indeed it is a sparse worktree, but the files from the root
> directory are also there.

I think this is working as intended.

Without knowing about the non-tree entries' object names, you cannot
create your next commit on top, as you need to be able to compute
the tree object's contents.  You'd update some files in "somepath",
and that directory being populated you can compute the object name
of the tree that represents the state of "somepath" after your
update.  But that object name must be mixed with other things in the
same directory as "somepath" (i.e. in the root tree), so they must
be known.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux