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

diff: enable and test the sparse index #419

Merged
merged 1 commit into from
Sep 12, 2021

Commits on Sep 10, 2021

  1. diff: enable and test the sparse index

    Enable the sparse index within the 'git diff' command. Its implementation
    already safely integrates with the sparse index because it shares code with the
    'git status' and 'git checkout' commands that were already integrated. The most
    interesting thing to do is to add tests that verify that 'git diff' behaves
    correctly when the sparse index is enabled. These cases are...
    
    1. The index is not expanded for `diff` and `diff --staged` (which both
    involve reading from the index).
    2. `diff` and `diff --staged` behave the same in full
    checkout, sparse checkout, and sparse index repositories in the following
    partially-staged scenarios (i.e. the index, HEAD, and working directory
    differ at a given path):
        1. Path is within sparse-checkout cone.
        2. Path is outside sparse-checkout cone.
        3. A merge conflict exists for paths outside sparse-checkout cone.
    
    Signed-off-by: Lessley Dennington <lessleydennington@gmail.com>
    ldennington committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    73c2e9a View commit details
    Browse the repository at this point in the history