From: Eric Sunshine Date: Sun, 06 Feb 2022 19:36:39 GMT Subject: Re: [PATCH v5 5/5] worktree: copy sparse-checkout patterns and config on add Message-ID: In-Reply-To: On Sun, Feb 6, 2022 at 6:30 AM Eric Sunshine wrote: > On Mon, Jan 31, 2022 at 10:01 AM Derrick Stolee via GitGitGadget > wrote: > > + new=repo/.git/worktrees/worktree/info/sparse-checkout && > > For robustness, this should be using: > > new=$(git rev-parse --git-path info/sparse-checkout) > > to retrieve ".git/worktrees//info/sparse-checkout" rather than > hard-coding "worktree" for "". Of course, I mean to type: new=$(git -C worktree rev-parse --git-path info/sparse-checkout)