| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|\
| |
| | |
diff-lcs 1.4.4 - Fix broken formatting
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Resolve #65: Two different issues were reported:
- Line numbers changed between 1.3 and 1.4. This change is intentional, but
in comparing the output against `diff` for the new examples provided
it became clear that for unified and context diffs, the last hunk was
reporting incorrect hunk lengths (that is, if it was `12,4 11,8`, it should
have been `12,3 11,7`. This has been resolved by providing
`Diff::LCS::Hunk#diff` an additional parameter, `last` which defaults to
`false`.
- Net new lines were added in the middle of a unified diff hunk, which was
incorrect. That is, we were getting:
```diff
@@ -10,6 +11,10 @@
recipe[j::default]
recipe[k::default]
recipe[l::default]
+recipe[o::new]
+recipe[p::new]
+recipe[q::new]
+recipe[r::new]
recipe[m::default]
recipe[n::default]
```
instead of:
```diff
@@ -12,3 +11,7 @@
recipe[l::default]
recipe[m::default]
recipe[n::default]
+recipe[o::new]
+recipe[p::new]
+recipe[q::new]
+recipe[r::new]
```
This has been resolved. The error was that `Diff::LCS::Block#diff_size` was
applying `.abs` to its output, which is incorrect. We need to know the
direction of the size for placing changes, but when determining the maximum
block size for use in `Diff::LCS::Hunk#diff` calculations, we need to know
the `.abs` size.
- New tests were added to prevent these changes from regressing in the
future, both as issue tests and as additional `ldiff` tests. These tests
highlighted more issues with diff-lcs output as compared to `diff`,
specifically the handling and reporting of missing newlines at the end of
files. All of the issues highlighted were resolved and the structure of
`ldiff` tests was changed so that it is easier to add new comparison files
at any time.
- Resolve #35: Indicate that when comparing against custom objects, `#eql?`
must be implemented such that objects that _resolve_ to the same meaning are
_treated_ as the same meaning. This is important because the basic LCS
algorithm uses a hash for position matching.
- Resolve #43: Provide a more meaningful error from `Diff::LCS::Hunk.new` if
the `piece` provided does not create useful `Diff::LCS::Block`. It's
extremely unlikely, this error will be more useful than `NoMethodError` being
thrown.
- Resolve #44: `ldiff` binary detection failed to work correctly. It had been
`!old_text or !new_text`, but the precedence of `or` broke that. It is now
`!old_text || !new_text`.
Also:
- Ran Rubocop again. Updated configuration definitions, fixed some code
formatting.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# This is the 1st commit message:
Fix improperly placed chunks
Resolve #65
- Also add even more tests for checking `ldiff` results against `diff` results.
- Fix issues with diff/ldiff output highlighted by the above tests.
- Add a parameter to indicate that the hunk being processed is the _last_ hunk;
this results in correct counting of the hunk size.
- The misplaced chunks were happening because of an improper `.abs` on
`#diff_size`, when the `.abs` needed to be on the finding of the maximum diff
size.
# This is the commit message #2:
Ooops. Debugger
# This is the commit message #3:
Restore missing test
- Fix some more format issues raised by the missing test.
- Start fixing Rubocop formatting.
# This is the commit message #4:
Last RuboCop fixes
# This is the commit message #5:
Finalize diff-lcs 1.4
# This is the commit message #6:
Fix #44
The problem here was the precedence of `or` vs `||`. Switching to `||` resulted
in the expected behaviour.
# This is the commit message #7:
Resolve #43
# This is the commit message #8:
Typo
# This is the commit message #9:
Resolve #35 with a comment
|
|
|
|
| |
- Clarify the compatibility policy some.
|
|\
| |
| | |
Fix some issues with 1.4 on older Rubies
|
|/
|
|
|
| |
- Required to fully support rspec.
- Resolves #63.
|
|\
| |
| | |
Change when max_diff_size is applied
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
- This appears to satisfy the issues found in #60 as well as providing the
additional fixes required to properly test ldiff.
Resolves #60
|
|\ \
| |/
|/| |
Fix Styel/NumericPredicate has the wrong namespace - should be Style
|
|/ |
|
|\
| |
| | |
Fix an issue with negative hunk max_size
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
Resolves #57.
- The `diff_size` should be an absolute value.
- Added a test to ensure that the issue does not introduce a regression.
|
|\
| |
| | |
Prepare for 1.4 release
|
|/
|
|
|
|
|
|
| |
- Use GitHub Actions
- Exclude windows code from non-windows tests
- Exclude unsupported windows tests and allow windows failures for now
because of line-ending differences
- Remove Travis configuration
|
| |
|
|\
| |
| | |
Various updates for v 1.4
|
|/
|
|
|
| |
- Support hoe >= 3.18
- Various bug fixes and updates
|
|\
| |
| | |
Add truffleruby to travis CI
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Resolve ldiff output issues: Resolves #5 and #6 by adding system-output
comparison calls to `bin/ldiff` compared against some pre-generated output.
There is some timestamp manipulation involved with the output comparison,
as the timestamps are unstable because of the way that git clone works.
- Resolved a problem with bin/ldiff --context output.
- Resolved a Numeric/Integer OptParse issue: later versions of Ruby had
problems working with an `OptParse` option specification of `Numeric`; this
has been changed to `Integer`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- This required some level of code remediation in the main library, but all
tests now pass:
- Patchsets are now internally flattened one level explicitly, rather than
using Array#flatten. This ensures that only the outer patchset array is
flattened.
Fixes #48.
|
|
|
|
|
| |
- Other linting configuration also applied.
- Soft-deprecating versions older than 2.3.
|
|
|
|
|
|
|
|
|
|
| |
This reverts commits 01e0cae and 3b4d2be because they introduce fatally
breaking changes in the tests that were hidden by broken CI.
* 01e0cae: Add #to_ary to Diff::LCS::Change and Diff::LCS::ContextChange
[Akinori MUSHA]
* 3b4d2be: Mention in rdoc that Diff::LCS::ContextChange can be converted to an
array [Akinori MUSHA]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It would be quite handy if you could write as follows:
```ruby
Diff::LCS.sdiff(a, b).each do |action, (old_position, old_element), (new_position, new_element)|
case action
when '!'
# replace
when '-'
# delete
when '+'
# insert
end
end
```
|
|\ |
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Various diff-lcs Fixes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Updated testing and gem infrastructure.
- Cleaning up documentation.
- Modernizing specs.
- Silence Ruby 2.4 Fixnum deprecation warnings. Fixes #36, #38.
- Ensure test dependencies are loaded. Fixes #33, #34 so that specs can be run
independently.
- Fix issue #1 with incorrect intuition of patch direction. Tentative fix, but
the failure cases pass now.
|
|/ |
|
|\
| |
| | |
Update Homepage URL in gemspec file
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| | |
update Change and ContextChange's '==' methods to compare against the other object's class
|
| |
| |
| |
| | |
compare against the other object's class
|
| |
| |
| |
| |
| |
| |
| | |
- Until I can work up a better page.
Fixes #26.
Fixes #28.
|
| |
| |
| |
| | |
Fixes #21.
|