Releases: dandavison/delta
0.12.1
What's Changed
- Make git include colors in output going to delta by @dandavison in #966
- Clarify language: "in front of" → "before" by @waldyrious in #967
- Fix parsing for .properties files with
-
in path by @jdpopkin in #975 - Support CSI sequences other than SGR by @yoichi in #976
- Enable commit links for GitLab by @jwarlander in #972
- Fall back to plain diff when process substitution is used by @th1000s in #978
- Include information about GIT_PAGER in manual by @katylava in #991
- Use assets API from bat library instead of vendored code by @dandavison in #903
- Calling process: Query more parents, disable full scan by @th1000s in #984
- Run in diff mode iff two positional arguments are supplied by @dandavison in #995
New Contributors
- @jdpopkin made their first contribution in #975
- @jwarlander made their first contribution in #972
- @katylava made their first contribution in #991
Full Changelog: 0.12.0...0.12.1
0.12.0
There's quite a lot in this release, with contributions from 8 different people.
Firstly a breaking change: some deprecated options are no longer supported: in particular plus-color
and minus-color
. See #914. A description of this change and what you need to do if you're affected by it is below.
Secondly, improvements, including:
- A (much-needed) short help text is now available: use
delta -h
. Delta is the proud possessor of 100 command-line options, so I think this is going to be helpful. - git blame output now displays line numbers (thanks to @th1000s)
- Improvements to file and mode labels by @WayneD
- delta now has a user manual: https://dandavison.github.io/delta/. You can even create a PDF copy (print button in upper-right hand corner), and the README is correspondingly now a much easier read with the minimal required setup instructions and an overview of functionality with screenshots.
Finally some bug fixes, including
- File path hyperlinks (e.g. in diff and grep output) were previously sometimes incorrect, especially when delta was invoked from a directory other than the repo root.
- Some fixes to grep output parsing edge cases
Deprecated options no longer supported:
The options affected here have been deprecated for a couple of years; I hope this doesn't cause you any trouble. Here are the details:
The most common case is that you have something like this in your ~/.gitconfig
:
[delta]
plus-color = my_plus_color
minus-color = my_minus_color
Please change that to
[delta]
plus-style = syntax my_plus_color
minus-style = normal my_minus_color
Here's the list of deprecated options with a summary of how to update them:
minus-color Deprecated: use `minus-style = normal my_background_color`
plus-color Deprecated: Use `plus-style = syntax my_background_color`
minus-emph-color Deprecated: use `minus-emph-style = normal my_background_color`
plus-emph-color Deprecated: Use `plus-emph-style = syntax my_background_color`
highlight-removed Deprecated: use `minus-style = syntax my_background_color`
commit-color Deprecated: use `commit-style = my_foreground_color
commit-decoration-style = my_foreground_color`
file-color Deprecated: use `file-style = my_foreground_color
file-decoration-style = my_foreground_color`
hunk-style Deprecated: synonym of `hunk-header-decoration-style`
hunk-color Deprecated: use `hunk-header-style = my_foreground_color
hunk-header-decoration-style = my_foreground_color`
theme Deprecated: use `syntax-theme`
For full documentation, please see delta --help
and https://dandavison.github.io/delta/configuration.html.
PRs
- Remove redundent spaces in README example by @TennyZhuang in #861
- Bump sysinfo from 0.22.2 to 0.22.3 by @dependabot in #862
- New option blame-code-style by @dandavison in #870
- Make formatted blame metadata determine color instead of commit by @dandavison in #871
- Put file-modified label in front of mode changes. by @WayneD in #874
- Speed up the calling process query by @th1000s in #869
- DeltaTest improvements by @WayneD in #876
- Make Config cloneable for DeltaTest, store as Cow there by @th1000s in #884
- Fix grep parse bugs by @dandavison in #865
- Handle a mode change on a renamed file. by @WayneD in #875
- New option file-transformation to transform file paths by @dandavison in #887
- Handle blame author names containing parentheses by @th1000s in #901
- Add OpenBSD installation note by @sizeofvoid in #894
- Create user manual by @dandavison in #882
- structopt to clap by @dandavison in #889
- Drop deprecated options by @dandavison in #914
- Add clap cosmetic argument names by @dandavison in #915
- Construct hyperlink file path relative to cwd by @dandavison in #898
- Bump clap from 3.0.5 to 3.0.7 by @dependabot in #917
- Cwd fixups by @dandavison in #918
- Center Align numbers right-ish by @th1000s in #883
- Blame line numbers by @th1000s in #885
- Update original mantis-shrimp, add lite version by @2KAbhishek in #934
- Update sysinfo version by @GuillaumeGomez in #921
- Update color-moved-support.md by @chtenb in #935
- Fix unused imports and functions warnings on windows by @th1000s in #950
- Fix hyperlink absolute paths by @dandavison in #939
New Contributors
- @TennyZhuang made their first contribution in #861
- @sizeofvoid made their first contribution in #894
- @GuillaumeGomez made their first contribution in #921
- @chtenb made their first contribution in #935
Full Changelog: 0.11.3...0.12.0
0.11.3
- Fix handling of
--word-diff
and--color-words
(#829). Note thatline-numbers
andside-by-side
will be ignored if delta detects that the input was generated bygit --word-diff / --color-words
. DELTA_FEATURES
can now be used to add to features specified in ~/.gitconfig. Use a+
prefix to do this: an example isDELTA_FEATURES=+side-by-side
which will activateside-by-side
, in addition to your usual features.- Store
less
history file in a better location on Windows. Thanks @rashil2000 for this work! - Fix performance issue affecting some linux users (#839)
What's Changed
- Bump sysinfo from 0.19.2 to 0.20.5 by @dependabot in #811
- #833 refactoring by @dandavison in #834
- Store history file in data_local_dir for Windows by @rashil2000 in #847
- Query fewer processes when searching for the parent by @th1000s in #841
- Do not query CPU data when querying process data by @dandavison in #845
- Fix --word-diff / --color-words handling by @dandavison in #833
- Add features from DELTA_FEATURES env var instead of replacing with them by @dandavison in #849
- Fix raw line styles by @dandavison in #850
- Fix side-by-side syntax ANSI test failure by @dandavison in #852
- DeltaTest inspect() additions by @dandavison in #853
- Line state refactor by @dandavison in #851
New Contributors
- @rashil2000 made their first contribution in #847
Full Changelog: 0.11.2...0.11.3
0.11.2
0.11.1
Fixes a crash that can occur, see for example #826. Thanks @mrjoel.
What's Changed
- Be permissive about unexpected state machine state by @dandavison in #827
Full Changelog: 0.11.0...0.11.1
0.11.0
This release adds handling of merge conflicts and the "combined" diff format which git uses for merge commits; see the Merge conflicts README section and #189. Please consider setting
[merge]
conflictstyle = diff3
With that setting, when a merge conflict is encountered, delta will display diffs between the ancestral commit and each of the two merge parents:
PRs
- Handle combined diff format and merge conflicts by @dandavison in #812
- Handle failure to parse non hunk header by @dandavison in #823
Full Changelog: 0.10.3...0.11.0
0.10.3
- Delta was previously handling
--word-diff
and--color-words
output in a nonsensical way. With this release, delta does not attempt to handle these output types, allowing git's raw output through unchanged. Appropriate handling may be added later. See #152 - When a line is unchanged but paired with a line that has additions/deletions, delta now assigns the unchanged line
{plus,minus}-non-emph-style
; previously it assigned{plus,minus}-style
. This change does not alter visual output by default because by default those two style styles are set to the same value. See #785 - Fixes a bug affecting line numbers in
side-by-side
mode, see #819
PRs
- Refactor: further isolate side-by-side implementation by @dandavison in #801
- Refactor: rewrite superimpose_styles function by @dandavison in #804
- New assignment of emph and non-emph styles by @dandavison in #785
- 808 honor raw blame styles by @dandavison in #809
- Process cleanup by @th1000s in #805
- Do not handle --word-diff or --color-words output by @dandavison in #807
- Initial version of ARCHITECTURE.md by @dandavison in #806
- Fix navigate option in git config example by @maximd in #815
- Fix colorMoved in git config example by @maximd in #814
- [themes.gitconfig] add woolly-mammoth blame config by @Kr1ss-XD in #706
- Fix side-by-side line number miscount by @th1000s in #819
New Contributors
Full Changelog: 0.10.2...0.10.3
0.10.2
This releases fixes a bug when using side-by-side with git diff.colorMoved
. See #802
What's Changed
- 802 fix color moved side by side panic by @dandavison in #803
Full Changelog: 0.10.1...0.10.2
0.10.1
This release fixes a bug in color-moved handling when files have DOS line endings. See #800
What's Changed
- Remove trailing \r from raw line, in presence of ANSI escape sequences by @dandavison in #800
New Contributors
- @SuperSandro2000 made their first contribution in #796
Full Changelog: 0.10.0...0.10.1
0.10.0
New features in this release:
- delta displays output from
git grep
andrg --json ... | delta
with code syntax highlighting and navigate functionality. See README#grep and #774. - delta displays output from
git blame
with code syntax highlighting, hyperlinks to commits, and control over formatting. See README#git-blame and #761. - delta syntax highlights file contents produced by
git show $revision:/path/to/file
- delta can apply syntax highlighting and arbitrary styling to the raw colors emitted by
git --color-moved
. This is done by specifying rules for remapping styles usingmap-styles
. See below, and README#--color-moved-support and #72 - More powerful configuration options: styles can reference other styles, custom styles and custom colors can be defined in gitconfig and reused, and 140 colors can be specified using their standard CSS names. See below.
- New subcommand
--show-colors
outputs a demo of 140 background colors with syntax highlighting, to help choose background colors. - New subcommand
--parse-ansi
takes color input and prints out the corresponding style strings (useful formap-styles
) - Utilities for interrogating the command line of the process that is sending output to delta, added by @th1000s.
Here's an example of using map-styles
to assign delta styles (one with syntax highlighting) to the raw color-moved styles output by git. This should allow all git's color-moved options to be rendered using delta styles:
[delta]
features = my-color-moved-theme
[delta "my-color-moved-theme"]
git-moved-from-style = bold purple # An ad-hoc named style (must end in "-style")
map-styles = "my-color-moved-theme.git-moved-from-style => red #cccccc, \
bold cyan => syntax #cccccc"
# we could also have defined git-moved-to-style = bold cyan
To make use of that, you need to know that git is emitting "bold cyan" and "bold purple". But that's not always obvious. To help with that, delta now has a --parse-ansi
mode. E.g. git show --color=always | delta --parse-ansi
outputs something like this:
As you see above, we can now define named styles in gitconfig and refer to them in places where a style string is expected. We can also define custom named colors in git config, and styles can reference other styles; see the hoopoe theme for an example:
[delta "hoopoe"]
green = "#d0ffd0" # ad-hoc named color
plus-style = syntax hoopoe.green # refer to named color
plus-non-emph-style = plus-style # styles can reference other styles
Additionally, we can now use the 140 color names that are standard in CSS. Use delta --show-colors
to get a demo of the available colors, as background colors to see how they look with syntax highlighting:
PRs
- Util: check parent process for filename by @th1000s in #770
- Handle git blame by @dandavison in #761
- Use modify label on diffs & add right-arrow option by @WayneD in #780
- Allow styles to be specified as references to other styles by @dandavison in #784
- Support named colors by @dandavison in #786
- Handle grep output by @dandavison in #774
- Allow custom colors to be defined in gitconfig by @dandavison in #788
- --show-colors subcommand by @dandavison in #789
- Navigate regexp by @WayneD in #782
- Map styles for arbitrary color-moved styling, --parse-ansi subcommand by @dandavison in #793
New Contributors
Full Changelog: 0.9.2...0.10.0