Rewrite delta merging to combine file creation and non-contiguous deltas with fuzzy matches#1
Rewrite delta merging to combine file creation and non-contiguous deltas with fuzzy matches#1teliseo wants to merge 5 commits intorobohack:masterfrom
Conversation
|
Ah ha! Yes, of course including the initial revisions in the fuzzy matching is a good idea! I'll have a look at this soon -- I have one (well, two, but only one this will affect) repository where I do ongoing maintenance in SCCS first and then do a "continuous" migration to git where I don't want to have to force-push any changes to the existing Git repo. I may have to add a workaround (probably just a command-line option to control it) to avoid that. |
|
Ok, I’ve added a command-line option, and also working on some other related enhancements. Maybe wait a bit before merging this one. |
- By default, this non-contiguous merging is enabled, but may be disabled using the --no-combine-separate option, restoring previous behavior. - By default, the git commit gets the date of the latest SCCS delta, but this may be disabled using the --commit-date-earliest option, restoring previous behavior. - Fix capitalization of help texts. This implementation has one flaw: With non-contiguous merging and latest commit date both enabled (the default), git commit timestamps may be non-monotonic.
- Commits are reordered as necessary to guarantee monotonic commit timestamps even with non-contiguous merging, and using the latest delta timestamp as the commit timestamp (these methods are the current defaults). - Ensure that multiple deltas of the same file can't be combined in one commit. - Change --fuzzy-commit-window option to be an exclusive rather than inclusive bound so that 0 always creates one commit per delta (previously this behavior required the non-intuitive -1 to be specified).
|
I've added fuzzy merging of non-time-contiguous deltas, and other related improvements. See commit logs for details. Features which change the git commits all have options to revert to previous behavior. |
|
Bump. After an encouraging initial reply by the maintainer, it’s now been nearly three months. Is there something I can do to assist in the review process of this or #2? |
SCCS deltas for initial file creation have a default comment containing a date string, such as:
date and time created 25/01/31 13:49:52 by teliseoThis causes the fuzzy matching which combines deltas to fail, so that each file create becomes a separate git commit. This pull request fixes this, allowing them to compare equal.
However, because all file creations are now more similar, it might be a good idea to adjust the default --fuzzy-commit-window down from one week to something like a few hours, at most.