Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

rename tracking for tree diffs #742

Closed
wants to merge 7 commits into from
Closed

rename tracking for tree diffs #742

wants to merge 7 commits into from

Conversation

Byron
Copy link
Member

@Byron Byron commented Feb 17, 2023

Tasks

  • collect relevant configuration keys
  • rename tracking by identity
  • symlinks are only ever matched as exact match
  • support for file limit
  • optional copy tracking (figure out how to deal with multiple possible sources)
  • rename tracking with diff-based similarity (goal is -M50%)
  • some validation to assure we treat the fractions similar to git. - accept that we don't treat it perfectly similar
  • copy tracking with similarity
  • diff stats for rewrite targets - they are a natural outcome of the calculation
  • maybe find-copies-harders

See the PR with intermediate work: jmforsythe/Git-Heat-Map#6

Follow-up: #749


Special thanks to @pascalkuthe for his support and for listening to my ramblings while figuring things out.

@Byron Byron mentioned this pull request Feb 17, 2023
6 tasks
@Byron Byron force-pushed the rename-tracking branch 9 times, most recently from e59da5a to aefe955 Compare February 20, 2023 13:38
These methods allow to easily access the current object id and mode
of a change, as well as the mode separately.
Returns true if the entry points to a blob or a symlink.
…ilename()` builder method.

That way, the recorder can be used in other applications to keep track of the full
path *or* the filename.
…names only.

Previously the recorder would track full paths, but now it's possible to configure it
to track no paths or file names only.

That way it's possible to use the implementation in custom delegate implementations or
otherwise tune the computational cost according to actual needs.
Byron and others added 2 commits February 20, 2023 18:40
The invocation of `object::tree::diff::Platform::track_rewrites(Rewrites { percentage: None, ..Default::default() })`
is now able to explicitly configure perfect rename tracking without percentage of equivalence.

By setting `percentage = Some(<fraction>)` one can set how similar both files should be to be considered related.

The same can be configured for copy-tracking.

Note that by default, renames are considered if a file looks 50% similar, and copies tracking is
using the same convention.

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant