Commit Graph

19 Commits

Author SHA1 Message Date
Dan Davison
084a6d19b2 Accept clippy suggestions (#1632) 2024-02-19 12:56:22 -05:00
Dan Davison
3819e94263 Drop grep-header-style option 2023-06-03 10:00:50 -04:00
Dan Davison
a28231aebc Honor grep-header-decoration-style for ripgrep output 2023-06-03 08:05:11 -04:00
Dan Davison
83ca127e9e Introduce grep-output-type option: ripgrep or classic 2023-06-02 14:36:30 -07:00
nickelc
6a37445efb Add methods for getting GitConfig as reference (#1336) 2023-03-09 05:15:04 -05:00
nickelc
b614b1cb1d Get git's minus/plus style from config instead of copying it around (#1329) 2023-03-08 10:52:11 -05:00
nickelc
28bf556897 Fix clippy warnings (#1298)
* Fix clippy warnings

- `clippy::uninlined_format_args`

* Fix clippy warnings

- `clippy::clone_on_copy`
- `clippy::explicit_auto_deref`
- `clippy::iter_cloned_collect`
- `clippy::map_clone`
- `clippy::needless_borrow`
- `clippy::needless_lifetimes`
- `clippy::needless_return`
- `clippy::redundant_clone`
- `clippy::redundant_field_names`
- `clippy::seek_to_start_instead_of_rewind`
- `clippy::unnecessary_cast`
- `clippy::unused_unit`
2023-02-28 06:37:20 -05:00
Dan Davison
9106a51ac3 Drop deprecated options (#914)
Drop deprecated options

Fixes #891
2022-01-16 11:24:42 -05:00
Dan Davison
62ca45953f blame-separator and blame-separator-style options 2021-12-28 12:16:43 +00:00
Dan Davison
76905c8e87 Refactor blame handler
- Give up on repeat blame line optimization
- Don't assume blame key is commit
2021-12-28 12:16:43 +00:00
Dan Davison
a1b8dbc410 New option blame-code-style
Fixes #867
2021-12-24 07:40:45 -05:00
Dan Davison
6745f42dda Display merge conflicts 2021-12-05 11:25:05 -05:00
Dan Davison
dba418057e Support style names in --map-styles 2021-11-24 07:04:20 -05:00
Dan Davison
22ad2bcad5 Fix non-compiling code after independent merges 2021-11-22 15:08:25 -05:00
Dan Davison
78dac7b34e Allow custom colors to be defined in gitconfig (#788)
Similar to 7a64fa5a26 which allowed
custom styles. Custom styles must end in -style, but colors can be
anything. It unfortunately seems not to be possible currently to store
a global reference to git config, hence the size of this
commit (passing the reference down the call stack).
2021-11-22 15:00:52 -05:00
Dan Davison
07892bc572 Handle grep output
- Handle standard filepath:code and filepath:line_number:code output
  as produced by `git grep`, `rg -H`, `grep -H`, etc (with -n for line
  numbers).

- Retain the match highlighting as produced by the grep tool, and
  expose it in delta's color output styled with grep-match-style.
  (Note that --color=always is needed to retain the color if piping
  into delta, but not for `git grep` when delta is configured as git's
  pager)

- Special handling of -p, and -W options of `git grep`: these display
  the function context in which the matches occur.

- `navigate` keybindings jump between match function contexts under
  `git grep -p` and between matching lines under `git grep -W`.

Thanks @zachriggle for the proposal.
Fixes #769
2021-11-22 13:18:15 -05:00
Dan Davison
b5c0223e78 Set is_emph explicitly on *-emph-styles
This addresses a bug triggered by doing things like

minus-style = minus-emph-style

That was causing the is_emph bit to be set on minus-style, with
undesirable consequences.
2021-11-21 12:27:51 -05:00
Dan Davison
7a64fa5a26 Support custom styles in delta gitconfig 2021-11-21 12:27:51 -05:00
Dan Davison
df58ef0c68 Allow styles to be specified as references to other styles 2021-11-21 12:27:51 -05:00