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

sparse-index diff integration: initial attempt #418

Commits on Sep 1, 2021

  1. sparse-index for diff: initial attempt

    THIS CHANGE IS NOT IN FINAL FORM AND IS CURRENTLY JUST INTENDED FOR
    FEEDBACK. To understand the context laid out below I have purposefully
    included both source and test changes in this initial commit. Based on
    the feedback I get, I will either split this commit or create
    an entirely new branch with the necessary changes when it is ready to
    officially submit.
    
    This change enables running the `diff` builtin command without
    expanding the full index in a cone-mode sparse checkout. It is an attempt
    to add the basic infrastructure to "light up" sparse index for the
    command. However, based on some testing, this may need to change.
    
    After reviewing microsoft#417, I decided to add `ensure_full_index` to this
    initial commit in an attempt to maintain current behavior. However,
    as I started building and testing with and without this update, I
    noticed unexpected results.
    
    The `ensure_not_expanded` tests I added are passing with
    `ensure_full_index` both enabled and disabled. That felt wrong, so I
    used `TRACE2` to try and understand what was happening and have attached
    the results.
    
    It looks as though no code paths in `diff.c` are actually being used.
    On the bright side, however, it doesn't look as though `ensure_full_index`
    is ever being called. I recognize my lack of knowledge wrt `cache-tree`
    and `read-cache` may be the reason I'm unsure what the correct path
    forward is. In light of this, any guidance is appreciated.
    ldennington committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    7c094c3 View commit details
    Browse the repository at this point in the history