crate-ci / cargo-release

Cargo subcommand `release`: everything about releasing a rust crate.
Apache License 2.0
1.33k stars 112 forks source link

Use similar rather than difflib to get better diffs #756

Closed sourcefrog closed 7 months ago

sourcefrog commented 7 months ago

Gives much better diffs when lines are inserted

Fixes #755

After:

   Replacing in NEWS.md
--- NEWS.md
+++ NEWS.md
@@ -2,6 +2,8 @@

 ## Unreleased

+## 24.2.1
+
 - New: `--features`, `--no-default-features` and `--all-features` options are passed through to Cargo.

 - Changed: Minimum Rust version (to build cargo-mutants, not to use it) increased to 1.73.

If this is OK in principal I can update all the other call sites that use difflib.

sourcefrog commented 7 months ago

Thanks, please take another look.

Incidentally did you mean for there to be two shell.rs with almost identical contents? I didn't need to change them for this but I just noticed it and wondered if it was due to an accident with git or something.

sourcefrog commented 7 months ago

The cargo_deny failure (https://github.com/crate-ci/cargo-release/pull/756/checks) seems unrelated to this change

epage commented 7 months ago

Fixed shell.rs in a follow up.