Commit Graph

1666 Commits

Author SHA1 Message Date
Dan Davison
d0d1f09d24 Initial version of ARCHITECTURE.md 2021-11-29 08:55:57 -05:00
Dan Davison
b0e02830b2 Do not handle --word-diff or --color-words output
Fixes #440
Ref #152
2021-11-29 08:41:24 -05:00
Dan Davison
0f66f753d0 Refactor: is_in_hunk 2021-11-29 08:41:24 -05:00
Dan Davison
67df50c8a8 Refactor: parse command line 2021-11-29 08:41:24 -05:00
Thomas Otto
1c9be71dd9 Test sibling process detection 2021-11-29 08:39:56 -05:00
Thomas Otto
46b0c0441a Match process binary case insensitively 2021-11-29 08:39:56 -05:00
Thomas Otto
b34a031122 Clean up FakeParentArgs
Can fake once, for_scope, or with a given list.
2021-11-29 08:39:56 -05:00
Dan Davison
1427281619 Revert "Refactor: rewrite superimpose_styles function (#804)"
This reverts commit 3e21f00765.

Fixes #810
2021-11-28 21:20:18 -05:00
Dan Davison
91819a7cb1 Bump version 2021-11-28 21:06:08 -05:00
Dan Davison
ec08c4de76
808 honor raw blame styles (#809)
* Honor raw blame styles

Fixes #808

* Honor map-styles

* Comments
2021-11-28 20:18:10 -05:00
Dan Davison
a19945f3d9 Fix right fill style on color-moved lines
Bug introduced at 7d2ac30357
2021-11-28 18:28:22 -05:00
Dan Davison
85367a6ab2 Do not fill entirely new/removed lines with non-emph style 2021-11-28 18:28:22 -05:00
Dan Davison
af07e54c7b Refactor: hunk style sections handling
- Factor out a new function update_diff_style_sections
- Use MinusPlus construct more
2021-11-28 18:28:22 -05:00
Dan Davison
ff0921c39e Always use non-emph style for right fill 2021-11-28 18:28:22 -05:00
Dan Davison
39ef747843 Change rules for non-emph style
Fixes #776

Previously, when a paired plus line had no edits, it received
plus-style. With this commit such a line receives
plus-non-emph-style.

There's no change to unpaired lines (still plus-style) and paired
lines with edits (still a mosaic of plus-non-emph-style and plus-emph-style).

(The above statements hold for minus lines also).

Since *-non-emph-style defaults to *-emph-style, this commit does not
result in any change in output for users using the defaults.
2021-11-28 18:28:22 -05:00
Dan Davison
8a275c3617 Styles demo commit
The diff in this commit contains sections with all of the following semantics:

minus-style (old line 1)
plus-style (new line 1)
zero-style (line 2)
minus-non-emph-style (old line 4, and unchanged sections of old line 3)
minus-emph-style (deleted word "chaffinch" in old line 3)
plus-non-emph-style (new line 3, and unchanged sections of new line 4)
plus-emph-style (added word "dodo" of new line 4)
2021-11-28 18:28:22 -05:00
Dan Davison
b0eab4187e Initial file state 2021-11-28 18:28:22 -05:00
Dan Davison
3e21f00765
Refactor: rewrite superimpose_styles function (#804) 2021-11-27 15:09:08 -05:00
Dan Davison
1e1bd6b6b9 Adjust benchmark command 2021-11-27 11:24:11 -05:00
Dan Davison
52ce4c3443
Refactor: further isolate side-by-side implementation (#801) 2021-11-27 09:00:24 -05:00
Dan Davison
9c4888ffc7 Bump version in private Homebrew formula 2021-11-27 08:50:11 -05:00
Dan Davison
cf9ee14db3 Bump version in links to executables 2021-11-27 08:49:15 -05:00
Dan Davison
2f21f08e8f Bump version 2021-11-27 08:39:08 -05:00
Dan Davison
4c23aaf5c3 Don't build and test in release Make target 2021-11-27 08:39:08 -05:00
Dan Davison
7d2ac30357
802 fix color moved side by side panic (#803)
Append newline character when preparing raw line

Fixes #802
2021-11-26 23:41:25 -05:00
Dan Davison
a122013f07 Refactor: rename: LineSegments -> LineSections 2021-11-26 11:25:02 -05:00
Dan Davison
db7558e439 Update homebrew formula 2021-11-25 12:31:02 -05:00
Dan Davison
487425cd8e Update README to 0.10.1 2021-11-25 12:29:21 -05:00
Dan Davison
017c4a630d Bump version 2021-11-25 12:16:48 -05:00
Dan Davison
f65f312f1e
Remove trailing \r from raw line, in presence of ANSI escape sequences (#800)
Fixes #795
2021-11-25 11:12:43 -05:00
Sandro
4393ab925b Add simpler colorMoved config snipped, add highlights to all codeblocks 2021-11-24 21:19:08 -05:00
Dan Davison
438290f0ff Document new color-moved functionality 2021-11-24 17:53:41 -05:00
Dan Davison
70e3c0e318 Revert recommended configuration to core.pager = delta 2021-11-24 17:53:22 -05:00
Dan Davison
92d6591ef1 Fix test broken by 8ff50afccb 2021-11-24 13:43:19 -05:00
Dan Davison
8ff50afccb Do not recognize grep tools whose output we cannot currently parse
Ref #794
2021-11-24 13:06:38 -05:00
Dan Davison
7eb4928018 Bump version for release 2021-11-24 10:45:21 -05:00
Dan Davison
dba418057e Support style names in --map-styles 2021-11-24 07:04:20 -05:00
Dan Davison
4f4cd1493e Update hoopoe theme to use color variables 2021-11-24 05:52:26 -05:00
Dan Davison
114ae67022 Add --parse-ansi command 2021-11-23 19:30:36 -05:00
Dan Davison
5dc0d6ef7e New option to map raw styles encountered in input
Unify handling of styles parsed from raw line and computed diff
styles. This enables syntax highlighting to be used in color-moved
sections.

Fixes #72
2021-11-23 19:30:36 -05:00
Dan Davison
87f458ae6b Bug fix: don't forget non-emph states 2021-11-23 19:30:36 -05:00
Wayne Davison
0c0043b428
Navigate regexp (#782)
* Allow navigate-regexp value to be overridden.

* Don't add an empty label to the navigate_regexp.

* Make --hunk-label=str not require --navigate.

* Change navigate regexp to navigate regex.

* Turn navigate-regex into an Option<String>.
2021-11-22 20:19:23 -05:00
Dan Davison
c2743f5131 Handle broken pipe error in subcommands 2021-11-22 18:12:36 -05:00
Dan Davison
f54bde7606 Show colors subcommand
Color groups from https://www.w3schools.com/colors/colors_groups.asp
2021-11-22 18:12:36 -05:00
Dan Davison
22ad2bcad5 Fix non-compiling code after independent merges 2021-11-22 15:08:25 -05:00
dependabot[bot]
17ad9785a6
Bump smol_str from 0.1.18 to 0.1.21 (#763)
Bumps [smol_str](https://github.com/rust-analyzer/smol_str) from 0.1.18 to 0.1.21.
- [Release notes](https://github.com/rust-analyzer/smol_str/releases)
- [Commits](https://github.com/rust-analyzer/smol_str/compare/v0.1.18...v0.1.21)

---
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>
2021-11-22 15:01:06 -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
d000e40e61 Syntax-highlight git show $revision:./path/to/file.ext output 2021-11-22 13:18:15 -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
ce6258d1b8 Obtain parent git grep command line options 2021-11-22 13:18:15 -05:00