Commit Graph

1579 Commits

Author SHA1 Message Date
Dan Davison
3514c9e54c Don't use gren to generate release notes 2021-10-29 15:25:37 -04:00
Dan Davison
6ad9071932 Bump version 2021-10-29 15:21:29 -04:00
Dan Davison
47a4fdd208
Do not reformat submodule diffs under git add -p (#756)
Fixes #755
Ref #662
2021-10-29 11:24:20 -04:00
Dan Davison
081eb60299 Add screenshot of side-by-side with wrapping 2021-10-27 08:32:06 -04:00
Dan Davison
71f0568f9f Bump version in private Homebrew formula 2021-10-26 20:52:26 -04:00
Dan Davison
74147a7fab Update release Makefile 2021-10-26 20:51:20 -04:00
Dan Davison
f19524b0b5 Bump version in links to executables 2021-10-26 20:51:12 -04:00
Dan Davison
f1b3ca66b9 Bump version: 0.9.1 2021-10-26 20:46:53 -04:00
Dan Davison
0b8d2f32d3 README edits 2021-10-26 20:23:47 -04:00
Dan Davison
3aab5d1956 Delete unused blame CLI
This should have been done in 0745f853d4
and the command line options were therefore incorrectly released in
0.9.0.
2021-10-26 20:15:27 -04:00
Dan Davison
7a3527cf0d Bump version in private Homebrew formula 2021-10-26 20:12:52 -04:00
Dan Davison
e7513937df Update README 2021-10-26 20:10:18 -04:00
Thomas Otto
59e8908f82 Fix side-by-side mode without line numbers
Even though this feature enables line numbers, these can be disabled via
the git config `delta.line-numbers=false`. So always enable line numbers,
even if they do not print numbers.

Construct more structs with ..Self::default()
2021-10-26 18:05:30 -04:00
Thomas Otto
fbb654d437 Simplify incrementing of line numbers 2021-10-26 18:05:30 -04:00
Dan Davison
0745f853d4 Revert "Revert "Revert git blame handling (#746)""
This reverts commit 8886648374.
2021-10-26 14:49:25 -04:00
FnControlOption
40c004a6cf Update syntaxes and themes from bat v0.18.3 2021-10-26 13:27:31 -04:00
Dan Davison
e692804991 Ignore RUSTSEC-2020-0071
- Run audit when changing audit.toml
2021-10-26 12:04:29 -04:00
Dan Davison
8886648374 Revert "Revert git blame handling (#746)"
This reverts commit ec372683a1.
This reverts commit ff25f2ba3b.
2021-10-26 12:04:29 -04:00
Dan Davison
de8eebeab7 Ignore "RUSTSEC-2020-0159"
It appears to be inevitable at the moment due to the dependency chain
syntect -> plist -> chrono

See https://github.com/trishume/syntect/issues/385
2021-10-26 11:09:28 -04:00
Dan Davison
ff25f2ba3b Remove chrono dependency
Should have been included in #746
2021-10-26 09:48:31 -04:00
Dan Davison
ec372683a1
Revert git blame handling (#746)
* Security bug:
time-rs/time#293
https://rustsec.org/advisories/RUSTSEC-2020-0159.html
https://github.com/dandavison/delta/runs/4003260368?check_suite_focus=true

* No fix available in the chrono crate:
https://github.com/chronotope/chrono/issues/602
2021-10-26 09:46:45 -04:00
dependabot[bot]
a975f3dd82
Bump structopt from 0.3.23 to 0.3.25 (#744)
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.23 to 0.3.25.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.23...v0.3.25)

---
updated-dependencies:
- dependency-name: structopt
  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-10-25 19:30:47 -04:00
Dan Davison
5ff90b0d41 Document side-by-side line wrapping in README 2021-10-25 18:52:25 -04:00
Dan Davison
32f532ccff Bump version for release 2021-10-25 18:44:50 -04:00
Thomas Otto
5762a527a7 Re-enable ANSI fill by equalizing panel sizes
Make the two panels in side-by-side use the full terminal width by
inserting an extra space in the center between the panels if the
width is odd and ANSI filling is enabled.

Fall back to spaces when the output is not to a terminal.
2021-10-25 18:29:43 -04:00
Thomas Otto
3e82c125cc Remember if stdout is to an interactive terminal
Adapted `set_widths` because that's where there's
a Term instance already.
2021-10-25 18:29:43 -04:00
Thomas Otto
a8cd648929 Linenumber test helper added 2021-10-25 18:29:43 -04:00
Thomas Otto
d64532dc73 Wrap linenumber configs in MinusPlus or LeftRight 2021-10-25 18:29:43 -04:00
Thomas Otto
4f5e3ebbd1
Use fatal() to exit with errorcode 2 (#739)
* Fix two typos

* Dismantle two Pyramids of Doom

Use question mark operator instead

* Use fatal() to exit with errorcode 2
2021-10-18 11:15:58 -04:00
Thomas Otto
3a03d4b5ee Convert Align and Placeholder into enums
Also move number and style logic out of `format_and_paint_line_numbers()`
and into a separate `linenumbers_and_styles()` function.
2021-10-18 10:41:12 -04:00
Thomas Otto
cd50d30184 Store line number prefix/suffix as SmolStr 2021-10-18 10:41:12 -04:00
Thomas Otto
07228cc408
Width can be an offset from the terminal width (#727)
No longer subtract 1 from the terminal width to accommodate e.g.
`less --status-columns`, instead set `--width -1` explicitly.
2021-10-18 09:37:19 -04:00
dependabot[bot]
7a2258b565
Bump xdg from 2.3.0 to 2.4.0 (#737)
Bumps [xdg](https://github.com/whitequark/rust-xdg) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/whitequark/rust-xdg/releases)
- [Commits](https://github.com/whitequark/rust-xdg/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: xdg
  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>
2021-10-16 11:24:51 -04:00
dependabot[bot]
87a429da9c
Bump console from 0.14.1 to 0.15.0 (#738)
Bumps [console](https://github.com/mitsuhiko/console) from 0.14.1 to 0.15.0.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Changelog](https://github.com/mitsuhiko/console/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/console/compare/0.14.1...v0.15.0)

---
updated-dependencies:
- dependency-name: console
  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>
2021-10-16 11:24:34 -04:00
Dan Davison
3a21f1b10b
Merge pull request #515 from th1000s/wrap
Add side-by-side line wrapping mode
2021-10-16 11:16:56 -04:00
Thomas Otto
a30271a09e Change PlusMinus to the correct MinusPlus, add documentation 2021-10-16 14:07:30 +02:00
Thomas Otto
dbde169a28 Tests: store length of skipped header separately 2021-10-16 14:07:30 +02:00
Thomas Otto
1b238dbb8e Fix clippy warning needless_option_as_deref 2021-10-16 14:07:30 +02:00
Dan Davison
32aef48ccf Add inline-hint-style option and use for side-by-side wrap symbols 2021-10-16 14:07:30 +02:00
Dan Davison
7c93d279e6 Rename syntect module 2021-10-16 14:07:30 +02:00
Thomas Otto
dda6fdb457 Add side-by-side line wrapping
If the current line does not fit into the panel, then
it is not truncated but split into multiple lines. A
wrapping symbol is placed at the end of the line. If
the new line is short enough, it is right-aligned.

Wrapping is limited to a certain number of lines
(--wrap-max-lines), if this is exceeded the line is
truncated by a now highlighted truncation symbol.
To disable wrapping set this value to 0.
2021-10-16 14:07:30 +02:00
Thomas Otto
ebd008c364 Add line number width calculation 2021-10-16 14:07:30 +02:00
Thomas Otto
464e9cab80 Left/Right converted into a simple typedef 2021-10-16 14:07:30 +02:00
Thomas Otto
f467f4cdd0 StructOpt without Default
This does not use the values provided by default_value, so
validation will fail.
2021-10-16 14:07:30 +02:00
Thomas Otto
636b56729b Add fatal() function to handle exiting on errors
Panic when testing or exit with return value 2.
2021-10-16 14:07:28 +02:00
Dan Davison
85ba3ba578 Use bullet as default hunk marker in navigate mode
Ref 130b0b6a #684
2021-10-13 09:57:06 -04:00
dependabot[bot]
b5f533b712
Bump xdg from 2.2.0 to 2.3.0 (#734)
Bumps [xdg](https://github.com/whitequark/rust-xdg) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/whitequark/rust-xdg/releases)
- [Commits](https://github.com/whitequark/rust-xdg/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: xdg
  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>
2021-10-12 18:37:58 -04:00
dependabot[bot]
6048b31c3a
Bump ctrlc from 3.2.0 to 3.2.1 (#733)
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.2.0...3.2.1)

---
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>
2021-10-12 18:37:42 -04:00
dependabot[bot]
de57c6b476
Bump git2 from 0.13.22 to 0.13.23 (#730)
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.22 to 0.13.23.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.22...0.13.23)

---
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>
2021-10-12 18:37:27 -04:00
Dan Davison
d0c3fc52f8 Update diagnostics script 2021-09-30 18:45:15 -04:00