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

Draft: explore gix APIs, experiment with gix-blame API #1453

Draft
wants to merge 100 commits into
base: main
Choose a base branch
from

Commits on Jul 13, 2024

  1. Configuration menu
    Copy the full SHA
    48d6050 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c8ff66 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2024

  1. Configuration menu
    Copy the full SHA
    4fb06e4 View commit details
    Browse the repository at this point in the history
  2. Get diff between trees

    cruessler committed Jul 14, 2024
    Configuration menu
    Copy the full SHA
    7031d9e View commit details
    Browse the repository at this point in the history
  3. Get diff between two files

    cruessler committed Jul 14, 2024
    Configuration menu
    Copy the full SHA
    2001525 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2024

  1. Configuration menu
    Copy the full SHA
    75ec62a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    19710f1 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. Add Blame

    cruessler committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    301967c View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2024

  1. Wrap diffing in loop

    This is not a material change as the loop gets only executed once. It is
    mostly to keep indentation changes in a separate commit.
    cruessler committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    9c6cf0a View commit details
    Browse the repository at this point in the history
  2. Run loop more than once

    cruessler committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    27e21cd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1cad4df View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. Configuration menu
    Copy the full SHA
    1c595bc View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. Turn for into loop

    There’s an exit condition `parent_ids.is_empty()` which is sufficient
    for the first test case.
    cruessler committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    07dba00 View commit details
    Browse the repository at this point in the history
  2. Move new_lines_to_blame out of closure

    Otherwise, diffs with more than one hunk would yield incorrect results.
    cruessler committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    e931a65 View commit details
    Browse the repository at this point in the history
  3. Remove unnecessary code

    cruessler committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    b54ef01 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    87a7ae5 View commit details
    Browse the repository at this point in the history
  5. Add comment

    cruessler committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    08838ed View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    30f546b View commit details
    Browse the repository at this point in the history
  7. Rename file in fixture

    cruessler committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    f573bef View commit details
    Browse the repository at this point in the history
  8. Skip commits that don’t affect file

    This required merging the separate setup section into the loop, in order
    to be able to use `continue` when a diff did not contain changes for the
    path currently being blamed.
    cruessler committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    c54dc04 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ca37a03 View commit details
    Browse the repository at this point in the history
  10. Fix clippy issues

    cruessler committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    09b1d23 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2024

  1. Configuration menu
    Copy the full SHA
    857cbcc View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Fix clippy issues

    cruessler committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    30fbb7d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cfe40f5 View commit details
    Browse the repository at this point in the history
  3. Add test for changed lines

    cruessler committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    0f148ac View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    34d7f55 View commit details
    Browse the repository at this point in the history
  5. Add missing test setup

    cruessler committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    f1482dc View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Configuration menu
    Copy the full SHA
    ed4873d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    06e3405 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. Split DiffRecorder into ChangeRecorder and process_changes

    This is supposed to simplify the algorithm by reducing the state we need
    to keep track of. We also don’t have to run the `for` loop on every call
    to `process_change` anymore.
    cruessler committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    2eb1a16 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c35e06 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. Configuration menu
    Copy the full SHA
    29c2738 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    20c43cb View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2024

  1. Annotate type

    cruessler committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    d273131 View commit details
    Browse the repository at this point in the history
  2. Turn if into match

    cruessler committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    5a10add View commit details
    Browse the repository at this point in the history
  3. Add assert_hunk_valid!

    cruessler committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    9767ddd View commit details
    Browse the repository at this point in the history
  4. Extend test for delete line

    cruessler committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    f973e43 View commit details
    Browse the repository at this point in the history
  5. Add test for switched lines

    cruessler committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    ab69d6b View commit details
    Browse the repository at this point in the history
  6. Condense empty lines

    cruessler committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    de3f183 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1ddc883 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2024

  1. Configuration menu
    Copy the full SHA
    b9b1214 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2024

  1. Configuration menu
    Copy the full SHA
    6608af5 View commit details
    Browse the repository at this point in the history
  2. Replace PathBuf by Path

    cruessler committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    e4d42fa View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. Add UnblamedHunk to be able to track offset

    This is necessary for keeping track of deleted hunks in a file.
    cruessler committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    875e580 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. Configuration menu
    Copy the full SHA
    53fbe0c View commit details
    Browse the repository at this point in the history
  2. Fix clippy issues

    cruessler committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    bddcfd8 View commit details
    Browse the repository at this point in the history
  3. Add BlameEntry::new

    cruessler committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    70cdb19 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2024

  1. Correctly handle non-inclusive end

    Make change not a reference to be able to return new, non-reference
    values from match arms.
    cruessler committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    1f524cb View commit details
    Browse the repository at this point in the history
  2. Add UnblamedHunk::new

    cruessler committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    6ba878b View commit details
    Browse the repository at this point in the history
  3. Remove obsolete comment

    cruessler committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    6aa23a2 View commit details
    Browse the repository at this point in the history
  4. Keep two ranges in UnblamedHunk for clarity

    Before, the distinction between line numbers in the blamed file vs. line
    numbers in the file currently being examined was not always clear,
    particularly not when you were not familiar with how `UnblamedHunk` was
    supposed to work.
    cruessler committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    82a9aa0 View commit details
    Browse the repository at this point in the history
  5. Better separate offset and offset_in_destination

    `offset` is a property of an `UnblamedHunk`. It tells you by how many
    lines `range_in_destination` and `range_in_blamed_file` have diverged.
    `offset_in_destination`, on the other hand, keeps track of how many
    lines have been added in a single iteration of `process_changes`. This
    value is, at certain points, used as an input to `UnblamedHunk::new`.
    cruessler committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    e846264 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3de5028 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    125326e View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Add UnblamedHunk::offset

    cruessler committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    a964579 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    125ee47 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ce6b0c7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cfc0359 View commit details
    Browse the repository at this point in the history
  5. Remove unnecessary clone

    cruessler committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    7ca85e2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    01f747f View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. Configuration menu
    Copy the full SHA
    d64fb23 View commit details
    Browse the repository at this point in the history
  2. Take offset into account

    cruessler committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    77e5f03 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2024

  1. Add Offset

    cruessler committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    4b1c509 View commit details
    Browse the repository at this point in the history
  2. Add LineRange

    cruessler committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    e038dad View commit details
    Browse the repository at this point in the history
  3. Add BlameEntry::with_offset

    cruessler committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    42fa847 View commit details
    Browse the repository at this point in the history
  4. Add Offset::Deleted

    Fix test that had incorrect offset
    cruessler committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    c1badf3 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. Configuration menu
    Copy the full SHA
    55a19cf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6474729 View commit details
    Browse the repository at this point in the history
  3. Sort result in test

    cruessler committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    70d56db View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9ce6d35 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a2cd71b View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. Extract process_change

    cruessler committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    de76eeb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    83a6e03 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b850da5 View commit details
    Browse the repository at this point in the history
  4. Fill match arms

    cruessler committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    e6da874 View commit details
    Browse the repository at this point in the history
  5. Add more tests for unchanged lines

    Add assertions related to offset
    cruessler committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    6b16568 View commit details
    Browse the repository at this point in the history
  6. Add test for deleted hunk

    cruessler committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    7a7fd0a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e6103df View commit details
    Browse the repository at this point in the history
  8. Fix offset of new hunk

    cruessler committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    3f0de4b View commit details
    Browse the repository at this point in the history
  9. Fix offset when no overlap

    cruessler committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    68e5f17 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0b7cd03 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    9aff3e4 View commit details
    Browse the repository at this point in the history
  12. Fix offset of new hunk

    cruessler committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    362e7e6 View commit details
    Browse the repository at this point in the history
  13. Fix expectation in test

    cruessler committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    5909dc1 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    34530fd View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    5a8af77 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    060f73d View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Configuration menu
    Copy the full SHA
    3a296e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bb16cc1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1e4191d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    381b673 View commit details
    Browse the repository at this point in the history
  5. Add more context to comment

    cruessler committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    817b2ce View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b953eaa View commit details
    Browse the repository at this point in the history
  7. Use LineRange::with_offset

    cruessler committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    76b047c View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. Don't consume addition preceding unblamed hunk

    The addition might match subsequent unblamed hunks.
    cruessler committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    6290e10 View commit details
    Browse the repository at this point in the history
  2. Don't consume unchanged lines preceding unblamed hunk

    The unchanged lines might match subsequent unblamed hunks.
    cruessler committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    a93323a View commit details
    Browse the repository at this point in the history
  3. Change offset for changes when there is no hunk

    At this point, this is not strictly necessary as the changes to
    `offset_in_destination` are not read anywhere yet after they are changed
    in the added branches.
    cruessler committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    ca8f9e2 View commit details
    Browse the repository at this point in the history
  4. Don't consume deletion preceding unblamed hunk

    The deletion might match subsequent unblamed hunks.
    cruessler committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    025ff2a View commit details
    Browse the repository at this point in the history
  5. Don't consume unblamed hunk following deletion

    There might be more changes that are supposed to affect the unblamed
    hunk. The deletion might, for example, be followed by another deletion
    or by an addition both of which would have an effect on the offset that
    needs to be applied to the unblamed hunk.
    cruessler committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    d053429 View commit details
    Browse the repository at this point in the history