summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-12-03Bump version0.15.0Dan Davison
2022-12-03try fix bad alignment in unicode (#1144) (#1145)Sheldon Nico
* try fix bad alignment in unicode (#1144) * use width instead of count in wrap_line * fix fmt * 3 tests do not need fail * fix tests Co-authored-by: Thomas Otto <th1000s@posteo.net>
2022-12-03ci: release apple arm binary (#1239)Marco Ieni
* ci: improve formatting * ci.yaml: apply new formatting * ci: release apple arm binary * use cross for mac arm * wip * do not use cross * install targets
2022-11-29Highlighting improvements (#1244)Phillip Wood
* Stop ignoring a passing test edits::tests::test_infer_edits_12 passes so there is no need to ignore it. * Refactor Levenshtein tests Reduce the amount of repetition and specify the Levenshtein distance explicitly in preparation for changing the Levenshtein calculation and adding more tests in a future commit. As there are quite a few inputs to each test use a struct rather than a plain function for the tests as this effectively provides named parameters for the inputs. * Highlight deletions before insertions When a token has moved within a line try to highlight it as a deletion followed by an insertion. Currently -'b ' +' b' is highlighted as -'b[ ]' +'[ ]b' as if the space has moved to the left, instead highlight it as -'[b] ' +' [b]' as if the "b" has moved to the right. As the changes to the tests show this also tends to favor a longer match at the start of the line. * Don't highlight an unchanged trailing space Only unchanged space between changed tokens should be highlighted, if the line ends with an unchanged space then the space should not be highlighted. * Try to group highlighted changes together Sometimes the highlighting of a change is not as clear as it could be. For example the change -printf "%s\n" s y y ... +test_write_lines s y n ... is highlighted as -[printf "%]s[\n"] [s ]y y ... +[test_write_lines ]s y y ... rather than -[printf "%s\n"] s y n ... +[test_write_lines] s y y ... This is because the Levenshtein distance calculation only checks if the current tokens match without considering if the previous tokens matched or not. Adding a small penalty for starting a run of changed tokens forces the changes to be grouped together whenever possible. A knock on effect of adding the penalty is that the cost a substitution needs to be increased relative to the cost of an insertion/deletion otherwise the lowest cost for "ab" -> "ba" is two substitutions rather than an insertion, match and deletion. There are several changes to the tests - the Levenshtein distance is updated to reflect the new calculation in tests::align::* - several new tests are added to tests::align to check the grouping of different combinations of insertions and deletions - tests::edits::test_infer_edits_10 shows an improvement in the highlighting as the unchanged space at the end of the changed tokens is no longer highlighted. This is because it is no longer considered to be deleted by the Levenshtein matching as deleting the space between the deleted words now has a lower cost. - there is a new test in tests::edits using the example in this message. * Stop using substitutions in Levenshtein calculation Now that the lowest cost edit path groups deletions and insertions together there seems to be little point in keeping substitutions. Indeed the lower cost of substitutions compared to a deletion followed by an insertion can adversely affect the highlighting. If the length of the line does not change delta will prefer to use substitutions over deletions and insertions even if it results in unchanged tokens being marked as changed. For example in -[a] a a a a a [b b b] +[c] a a a a a [a c c] unchanged tokens are marked as deleted and inserted. Without substitutions this is highlighted as -a a a a a a [b b b] +[c ]a a a a a a [c c] which highlights the insertion at the beginning of the line and the change at the end of the line more clearly. There is a change to the distance calculation as substitutions only contributed the length of the deletion whereas now the same change will add the length of both the deletion and the insertion. This is addressed by doubling the contribution of unchanged sections so that the denominator equals the sum of the distance contributions of the plus line and minus line.
2022-11-27ci: improve formatting (#1238)Marco Ieni
* ci: improve formatting * ci.yaml: apply new formatting
2022-11-15Handle quoted filenames in diff headerThomas Otto
Otherwise the file extension would return 'rs"' which does not match any language.
2022-11-15Remove Provides in Debian package (#1217)Witold Baryluk
Remove Provides in Debian package as this is incorrect usage of this flag. To provide two versions of packages `Conflicts` as used is sufficient. See Debian Policy Manual (v4.6.1.1) section 7.5 When at it Remove trailing dot in Description header to comply with section 5.6.13 Fixes: https://github.com/dandavison/delta/issues/1210
2022-11-13Fix clippy warnings (#1236)clnoll
2022-11-05Remove Git 2.37 workaround from install docs (#1228)Adam Johnson
2022-10-24measure_text_width() without constructing a temporary stringThomas Otto
2022-10-11Add terminal width fallback via stty if on Windows/MSYS2Thomas Otto
Also new workarounds.rs file, and DELTA_NO_WORKAROUNDS env var to disable these.
2022-10-11Fix clippy warnings after rust 1.64 upgradeThomas Otto
2022-10-06Add codeberg link parsing (#1194)Chinmay Dalal
2022-09-29Clarify that rg --json | delta is the only fully correct grep handlerDan Davison
Closes #1197
2022-09-15Refactoring ansi/iterator (#1191)Maxim Zhiburt
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
2022-09-14Check that new version number is present in docsDan Davison
Ref #1192
2022-09-14Bump version in links to executablesDan Davison
Fixes #1192
2022-09-14Add sourcehut link parsing (#1190)Chinmay Dalal
* Add sourcehut link parsing * refactor: GitRemoteRepo::GitHubRepo -> ..::GitHub, repo_slug -> slug https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names * readme.md: change bitbucket to sourcehut
2022-09-13Switch bat to library mode (#1187)Marcin Puc
2022-09-06Edit CONTRIBUTING.mdDan Davison
2022-09-05Add note about git config env vars to configuration manual page.Dan Davison
2022-09-05Change Rust toolchain in 'Deploy Manual' CI task (#1183)Dan Davison
2022-09-05New manual content: environment variables and configuration.Dan Davison
Ref #1113
2022-08-31Bump private homebrew formulaDan Davison
2022-08-31Whitespace formattingDan Davison
2022-08-31Bump version in links to executablesDan Davison
2022-08-31Bump version0.14.0Dan Davison
2022-08-19added auto completions for fish shellexploide
2022-08-16Fix clippy warnings after rust 1.63 upgrademliszcz
Following fixes are included: * derive_partial_eq_without_eq: Eq trait was added by running `cargo clippy --fix --no-deps`. * get_first: Function was replaced by running `cargo clippy --fix --no-deps`. * unnecessary_to_owned: This check was disabled for ANSIString as to_string call is required to enforce formatting. Otherwise the underlying string was returned directly (probably due to Deref implementation). * type_complexity: Closure type was simplified and Box<> usage was removed.
2022-08-16Support configurable timestamps in git blame output (#1157)mliszcz
New CLI/config option is introduced: blame-timestamp-output-format. Fixes #1157.
2022-08-16Update --help output in manual for 0.13.0mliszcz
2022-08-07Fix typos (#1151)Kian-Meng Ang
Found via following command: codespell -L crate,nin,numer,struc,ded,fo
2022-08-01chameleon theme update (#1138)Stefan Schnyder
2022-07-15Fix git-grep match-highlighting at line-start (#1057)Jackson Popkin
* Fix git-grep match-highlighting at line-start This commit fixes highlighting the part of the line of code that matches the git grep query in cases where the match starts at the beginning of the lines. Fixes #1056. * Fix handling of non-match highlight In some cases, `git grep` will customize the foreground-color for more than just the subset of the line that matches the grep pattern. This breaks the current match-detection behavior, which considers any characters with a non-default "foreground color" within the "code" part of a git-grep-ouput-line to be part of the match. This commit makes match-detection check for boldness and a red foreground instead of just checking for a non-default foreground-color. git grep matches are bold and red by default. But git grep isn't the only reason input to delta may contain color codes; there may still be cases where the highlighting looks wrong here.
2022-07-15Recreate highlighter on each line of `git show $commit:$path` output (#1127)Dan Davison
Prior to this commit, syntax highlighting of scala code was not correct in `git show $commit:$path` output. It was working for other languages as far as I know. I'm not sure why.
2022-07-05Revert "Bump git2 from 0.14.2 to 0.14.4 (#1085)"Dan Davison
This reverts commit 511d501d5e50ced37c74b3b84ee4d46a3a8f8bd5.
2022-07-04Update clap (#1119)Dan Davison
2022-07-04Bump itertools from 0.10.1 to 0.10.3 (#835)dependabot[bot]
Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.10.1 to 0.10.3. - [Release notes](https://github.com/rust-itertools/itertools/releases) - [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.1...v0.10.3) --- updated-dependencies: - dependency-name: itertools dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-04Bump serde_json from 1.0.70 to 1.0.82 (#1115)dependabot[bot]
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.70 to 1.0.82. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.70...v1.0.82) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-04Bump git2 from 0.14.2 to 0.14.4 (#1085)dependabot[bot]
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.14.2 to 0.14.4. - [Release notes](https://github.com/rust-lang/git2-rs/releases) - [Commits](https://github.com/rust-lang/git2-rs/compare/0.14.2...0.14.4) --- updated-dependencies: - dependency-name: git2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-04Bump smol_str from 0.1.21 to 0.1.23 (#1058)dependabot[bot]
Bumps [smol_str](https://github.com/rust-analyzer/smol_str) from 0.1.21 to 0.1.23. - [Release notes](https://github.com/rust-analyzer/smol_str/releases) - [Commits](https://github.com/rust-analyzer/smol_str/compare/v0.1.21...v0.1.23) --- updated-dependencies: - dependency-name: smol_str dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-04Bump ctrlc from 3.2.1 to 3.2.2 (#1055)dependabot[bot]
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/Detegr/rust-ctrlc/releases) - [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.2.1...3.2.2) --- updated-dependencies: - dependency-name: ctrlc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-04Bump sysinfo from 0.23.0 to 0.24.5 (#1108)dependabot[bot]
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.23.0 to 0.24.5. - [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases) - [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md) - [Commits](https://github.com/GuillaumeGomez/sysinfo/commits) --- updated-dependencies: - dependency-name: sysinfo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-04Bump bytelines from 2.2.2 to 2.4.0 (#1034)dependabot[bot]
Bumps [bytelines](https://github.com/whitfin/bytelines) from 2.2.2 to 2.4.0. - [Release notes](https://github.com/whitfin/bytelines/releases) - [Commits](https://github.com/whitfin/bytelines/compare/v2.2.2...v2.4.0) --- updated-dependencies: - dependency-name: bytelines dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-02Don't attempt to process ANSI sequences in non-UTF8 inputDan Davison
Fixes #677
2022-07-01Update README.md to include git 2.37.0 workaround (#1116)Connor Braa
see https://github.com/dandavison/delta/issues/1114
2022-06-25Fix documentation of DELTA_FEATURESDan Davison
2022-06-25Document DELTA_FEATURES in the manualDan Davison
2022-06-22Fix whole-file changes being attributed to the wrong commit in "git log" outputBjörn Steinbrink
The pending buffer for whole-file changes is currently only flushed when encountering a new diff header. This leads to it being carried over across commit boundaries in cases where multiple commits are shown. To fix this, we simply need to flush the buffered data on a commit boundary as well. Fixes #1089
2022-06-22Allow to run tests using "cargo t"Björn Steinbrink
The test_process_calling_cmdline test only allows "cargo test" and "cargo tarpaulin" for running the testsuite, for "cargo t" is a built-in alias for "cargo test" and should be allowed, too.