[BUG REPORT] sparseIndexExpanded hint always shows on sparse worktree move

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

 



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





[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