git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG REPORT] sparseIndexExpanded hint always shows on sparse worktree move
@ 2024-08-08  2:07 Brian Lyles
  2024-08-15 14:25 ` Derrick Stolee
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Lyles @ 2024-08-08  2:07 UTC (permalink / raw)
  To: git; +Cc: Derrick Stolee

After updating to v2.46.0, the "sparse index is expanding to a full
index" hint added in 9479a31d60 (advice: warn when sparse index expands,
2024-07-08) seems to show any time a worktree using a sparse index is
moved. This is easily reproduced with the following script:

    git init --initial-branch=main main-worktree
    mkdir main-worktree/A main-worktree/B
    touch main-worktree/A/a.txt main-worktree/B/b.txt
    git -C main-worktree add .
    git -C main-worktree commit -m "initial commit"
    git -C main-worktree worktree add --no-checkout ../other-worktree -b other main
    git -C other-worktree sparse-checkout set A --sparse-index
    git -C other-worktree checkout
    git -C main-worktree worktree move ../other-worktree ../other-worktree-moved

It does not appear that the index is ever actually touched. Testing in a
real repository shows that the index size does not change, nor does its
last modified timestamp.

I've reproduced this on Windows, MacOS, and Gentoo Linux.

-- 
Thank you,
Brian Lyles

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-10 19:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-08  2:07 [BUG REPORT] sparseIndexExpanded hint always shows on sparse worktree move Brian Lyles
2024-08-15 14:25 ` Derrick Stolee
2024-09-10 19:33   ` Brian Lyles

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).