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

Remove sparse index expansions from untracked file stashes #433

Merged
merged 3 commits into from
Sep 24, 2021
Merged

Remove sparse index expansions from untracked file stashes #433

merged 3 commits into from
Sep 24, 2021

Commits on Sep 24, 2021

  1. unpack-trees: expand conditions for sparse result index

    After `unpack-trees` processing, the index would only be considered "sparse" if
    it contains any sparse directories. That condition missed the case where the
    index contains only files inside the sparse checkout definition. By explicitly
    checking for that condition and setting `sparse_index` accordingly, later
    processing to ensure the index "remains" full can be avoided.
    
    Signed-off-by: Victoria Dye <vdye@github.com>
    vdye committed Sep 24, 2021
    Configuration menu
    Copy the full SHA
    8e2748e View commit details
    Browse the repository at this point in the history
  2. checkout-index: perform lazy index expansion for --sparse

    When `--sparse` is specified for `checkout-index` but no sparse directory
    entries exist outside the sparse checkout definition, the index does not need
    to be expanded. For this case, moving the index expansion into an explicit
    check for a sparse directory entry prevents unnecessary expansion.
    
    Signed-off-by: Victoria Dye <vdye@github.com>
    vdye committed Sep 24, 2021
    Configuration menu
    Copy the full SHA
    0e01d41 View commit details
    Browse the repository at this point in the history
  3. stash: move sparse index test for stash -u

    Move the test for `git stash -u` into the `sparse-index is not expanded` test
    because it no longer expands the index (temporary or otherwise) when all
    stashed files are in the sparse checkout definition.
    
    Signed-off-by: Victoria Dye <vdye@github.com>
    vdye committed Sep 24, 2021
    Configuration menu
    Copy the full SHA
    8b83ef8 View commit details
    Browse the repository at this point in the history