Re: Workflow for GitHub branch model interop: advice?

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

 



Hi William,

On Sat, 9 Feb 2019, William Chargin wrote:

> [...] creating a whole worktree is a bit heavy-handed.  Creating a new
> worktree for linux.git takes about 6 seconds on my laptop, which is not
> terrible considering that repository’s size, but would be nice to avoid
> if possible.

Agreed.

> It would be great if I could create a “lazy worktree” and only check out
> files actually needed for the merge.

I do use the `git worktree add --no-checkout` trick in one of my scripts
to have a "super light-weight" worktree.

To make it work in your case, you'd then have to inspect the changes you
want to replay, e.g. via `git log --name-only <range>` to craft an
appropriate `sparse-checkout` file (but don't forget to *also* set the
config variable `core.sparseCheckout`) before checking out any files. I am
sure you can even automate generating that `sparse-checkout`.

> Would the partial clone feature added in v2.19 be helpful here?

I doubt it. The partial clone still needs you to know which files you
want.

VFS for Git would help you here. But something tells me that you're on
Linux, and there is no official VFS for Git on Linux yet.

Ciao,
Johannes

[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