Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: banga/git-split-diffs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: banga/git-split-diffs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: handle-combined-diffs
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 9 commits
  • 9 files changed
  • 1 contributor

Commits on Jul 1, 2024

  1. Checkpoint generalizing to hunks with more than two "parts"

    The parts here refer essentially to commits. In a
    combined diff, there are at least 3 commits in
    consideration.
    banga committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    c2a17dc View commit details
    Browse the repository at this point in the history
  2. Checkpoint working combined diffs implementation

    Took a while to come up with something that looks
    correct. Essentially we show the final state as
    the last "part" i.e. vertical section and the rest
    of the parts show changes made in the
    corresponding parent commit. The line width is
    currently incorrect, will fix later.
    banga committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    57dc242 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8ce04f9 View commit details
    Browse the repository at this point in the history
  4. Implement unified diff rendering for combined diffs

    The naming is getting confusing here, but the approach we had for
    rendering a unified diff for "unified diffs" wasn't great for "combined
    diffs" because it would end up repeating additions/deletions.
    
    So, I added a separate implementation which essentially renders what you
    would see in the last column of the split diff. This required showing
    deletions in the split diff as well, which I had previously skipped. I
    think that still looks fine, so will let it be.
    banga committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    4f38cb9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    de57f10 View commit details
    Browse the repository at this point in the history
  6. Handle more than 2 parents in combined diffs

    The "@"s in the header vary by number of parents, so we need to handle
    that.
    banga committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    0c62e0f View commit details
    Browse the repository at this point in the history
  7. Switch how we show deleted lines in combined diffs

    On re-reading "A - character in the column N means that the line appears
    in fileN but it does not appear in the result.", we should be showing
    the line in the files where it has a '-' prefix and not showing it in
    other files.
    banga committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    93cd259 View commit details
    Browse the repository at this point in the history
  8. Add test cases for merge commits

    Found some commits in the TypeScript repo that have non-empty combined
    diffs using:
    ```
    git rev-list --merges --all --min-parents=2 | while read commit; do if [ -n "$(git show --format='' $commit)" ]; then echo $commit; fi; done
    ```
    banga committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    787ea90 View commit details
    Browse the repository at this point in the history
  9. Check-off todo

    banga committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    4e342c4 View commit details
    Browse the repository at this point in the history
Loading