Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: allow adding sparse entries when virtual #392

Merged
merged 1 commit into from
Jul 1, 2021

Commits on Jul 1, 2021

  1. add/rm: allow adding sparse entries when virtual

    Upstream, a20f704 (add: warn when asked to update SKIP_WORKTREE entries,
    2021-04-08) modified how 'git add <pathspec>' works with cache entries
    marked with the SKIP_WORKTREE bit. The intention is to prevent a user
    from accidentally adding a path that is outside their sparse-checkout
    definition but somehow matches an existing index entry.
    
    A similar change for 'git rm' happened in d5f4b82 (rm: honor sparse
    checkout patterns, 2021-04-08).
    
    This breaks when using the virtual filesystem in VFS for Git. It is
    rare, but we could be in a scenario where the user has staged a change
    and then the file is projected away. If the user re-adds the file, then
    this warning causes the command to fail with the advise message.
    
    Disable this logic when core_virtualfilesystem is enabled.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    a5789d2 View commit details
    Browse the repository at this point in the history