Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement --diff-args #1697

Merged
merged 18 commits into from
Aug 15, 2024
Merged

Implement --diff-args #1697

merged 18 commits into from
Aug 15, 2024

Conversation

dandavison
Copy link
Owner

@dandavison dandavison commented May 7, 2024

Allow extra arguments to git diff to be passed from the delta commands line, as suggested by @calestyo in #1644 (comment)

E.g.

delta --diff-args=-U99 /tmp/a /tmp/b
delta -@=-U99 /tmp/a /tmp/b

Note that the = is required in this case, due to the - that comes next.

src/cli.rs Outdated Show resolved Hide resolved
src/subcommands/diff.rs Outdated Show resolved Hide resolved
src/subcommands/diff.rs Outdated Show resolved Hide resolved
@dandavison
Copy link
Owner Author

dandavison commented Aug 1, 2024

This is almost ready.

An example of how delta reports an external process error:

$ delta -@-U-1 <(cat b.rs) src/paint.rs
diff: invalid context length '-1'
diff: Try 'diff --help' for more information.
'diff' process failed with exit status 2. Command was: diff -U3 -U-1 -- /dev/fd/11 src/paint.rs

One issue is that I see that git does now support process substitution https://stackoverflow.com/questions/22706714/why-does-git-diff-not-work-with-process-substitution Which is great, but now it would be nice to improve the fallback logic. We could detect the git version as we do for less, or we could try git diff and fall back to diff in the case of a certain error exit code and via_process_substitution(file) returning true. We could address this in a separate PR.

@dandavison dandavison marked this pull request as ready for review August 1, 2024 13:37
@dandavison dandavison force-pushed the git-diff-options branch 4 times, most recently from 6aedd73 to 2bc8444 Compare August 2, 2024 12:01

// It looks like `git diff` failed due to lack of process substitution (version <2.42);
// try again with `diff`.
diff(minus_file, plus_file, Differ::Diff, config, writer)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@th1000s I think this PR is almost there. I would like the following to be true:

if a user has git >= 2.42 then delta will use git diff, even if they use process substitution.

(So that their git config is honored and they can use all the git diff options).

Instead of trying to detect the user's git version, the current state of this PR always tries git diff and falls back to diff if it seems to have failed due to process substitution. After all, this problem should become rarer and rarer as people upgrade git.

This seems to be working on the two Mac laptops I tested on (one with old git and one new), since with the old git I am getting an error (not merely printing of filenames):

$ git diff --no-index <(cat [b.rs](http://b.rs/)) src/[paint.rs](http://paint.rs/)
error: /dev/fd/11: unsupported file type
fatal: cannot hash /dev/fd/11
$ echo $?
128
$ git --version
git version 2.39.3 (Apple Git-146)

However it sounds like from your comment that you encountered incorrect output with a success (< 2) exit code:

When called as delta <(echo foo) <(echo bar), then git < 2.42 just prints the diff of the filenames which were created by the process substitution and does not read their content.

If so, then I think my PR needs to do a bit more.

Any thoughts? (and any chance you can test out this PR??)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, on Linux git sees e.g. /proc/self/fd/16, then reads and diffs nonsense like pipe:[15699060]. But I would just document that this requires git v2.42 and not call and parse git --version first.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, on Linux git sees e.g. /proc/self/fd/16, then reads and diffs nonsense like pipe:[15699060]. But I would just document that this requires git v2.42 and not call and parse git --version first.

Just to make sure I understand, are you saying we should

  1. just not bother calling diff at all, now that git supports process substitution? If the user is trying process substitution then they should use a recent git that supports it.

or

  1. that we should now always invoke git twice, i.e. the first time call git to parse the version and the second time call git or diff to compute the diff?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be okay with 1. because this will work everywhere.. eventually. But if 2. is not too much work now (and I remember that parsing less --version takes just 4ms) that would be nicer of course.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to parsing the git version. I think this PR is ready now.

Comment on lines 107 to 108
let is_git_diff = matches!(differ, Differ::GitDiff);
if is_git_diff
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not #[derive(PartialEq)] (and Debug for good measure)? Then just == is possible.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks.


// It looks like `git diff` failed due to lack of process substitution (version <2.42);
// try again with `diff`.
diff(minus_file, plus_file, Differ::Diff, config, writer)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, on Linux git sees e.g. /proc/self/fd/16, then reads and diffs nonsense like pipe:[15699060]. But I would just document that this requires git v2.42 and not call and parse git --version first.

@dandavison dandavison force-pushed the git-diff-options branch 2 times, most recently from 4f2581a to ed64f46 Compare August 14, 2024 02:57
@dandavison
Copy link
Owner Author

This isn't very well tested, the excuse being the dependency on the presence and installed versions of external software.

Some commands I've used in local testing

git show HEAD~100:src/paint.rs > b.rs
delta --diff-args='-U1 --no-color' <(cat b.rs) src/paint.rs
delta <(cat b.rs) src/paint.rs
# This works on a machine with git >= 2.42, since it calls git diff,
# which tolerates a negative value
delta --diff-args='-U-1 --no-color' <(cat b.rs) src/paint.rs

# But on a machine with 2.39.3 it yields the following,
# because the process substitution cause it to use diff, which does not tolerate
# the negative value

'diff' process failed with exit status 2. Command was: diff -U3 -U-1 --no-color -- /dev/fd/11 src/[paint.rs](http://paint.rs/) 

(exit code 2)
$ delta -@='--no-index --nonsense' <(cat b.rs) src/paint.rs
error: unknown option `nonsense'
'git' process failed with exit status 129. Command was: git diff --no-index --color --no-index --nonsense -- /dev/fd/11 src/paint.rs

} else {
None
}
}
Copy link
Owner Author

@dandavison dandavison Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, this takes 6.5ms on an M2 Mac (hyperfine's estimate based on 1000 calls in a loop), so slightly slower than the 4ms you found for less. (But, if neither file uses process substitution then it's not done at all) EDIT: actually, it's now always doing version detection; it uses it to determine whether git is installed at all.

@th1000s
Copy link
Collaborator

th1000s commented Aug 14, 2024

Looks good. One mistake I made when testing was using -@U1 instead of -@-U1, maybe the former can be silently converted, all (git) diff arguments other than the files start with a dash anyhow.

$ delta -@U1 <(cat a) b
diff: extra operand 'b'
diff: Try 'diff --help' for more information.
'diff' process failed with exit status 2. Command was: diff -U3 U1 -- /proc/self/fd/16 b

@dandavison
Copy link
Owner Author

One mistake I made when testing was using -@U1 instead of -@-U1, maybe the former can be silently converted, all (git) diff arguments other than the files start with a dash anyhow.

Good call, that seems like a nice usability improvement. Done. (For the first argument only)

@dandavison
Copy link
Owner Author

dandavison commented Aug 14, 2024

There's still this minor mystery, as was the case 3 years ago: #546 (comment)

We have to skip this case

#[case("/dev/null", "/dev/null", ExpectDiff::No)]

Because it fails on (ubuntu-latest, i686-unknown-linux-gnu, true), but passes on all other builds.

I.e., apparently, on (ubuntu-latest, i686-unknown-linux-gnu, true) our test sees git diff --no-index /dev/null /dev/null returning exit status 1 (I think it's resolving to git diff; until my last commit there was an error if git wasn't installed)

@dandavison
Copy link
Owner Author

dandavison commented Aug 14, 2024

One final change: it now works if git isn't available. This means we're doing git version lookup in all code paths (let me know if you question wisdom of this or have a better idea). (Incidentally, I was misled by the name of grep_cli::resolve_binary -- it does nothing on non-Windows).

@th1000s
Copy link
Collaborator

th1000s commented Aug 15, 2024

.. all code paths when diffing, that seems okay. And we will just leave the /dev/null mystery for later :)

@dandavison dandavison merged commit 5c53c5e into main Aug 15, 2024
13 checks passed
@dandavison dandavison deleted the git-diff-options branch August 15, 2024 10:42
@dandavison
Copy link
Owner Author

Great, thanks for all the reviewing and discussion @th1000s.

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 20, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dandavison/delta](https://github.com/dandavison/delta) | minor | `0.17.0` -> `0.18.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>dandavison/delta (dandavison/delta)</summary>

### [`v0.18.0`](https://github.com/dandavison/delta/releases/tag/0.18.0)

[Compare Source](dandavison/delta@0.17.0...0.18.0)

As usual, tons of excellent contributions, all but one not by me! [@&#8203;th1000s](https://github.com/th1000s) has made a huge number of important and difficult improvements to delta and helped with many issues over the few years since the project started, and so I'm happy to say that he's co-maintaining the project with me nowadays. Thanks to all contributors for the improvements below!

#### What's Changed

-   Link to Repository from Manual by [@&#8203;bash](https://github.com/bash) in dandavison/delta#1657
-   Stop highlighting unchanged whitespace by [@&#8203;phillipwood](https://github.com/phillipwood) in dandavison/delta#1659
-   Add .gitattributes rules for rust files by [@&#8203;phillipwood](https://github.com/phillipwood) in dandavison/delta#1245
-   Repair --default-language, and highlight using full filename by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1549
-   tests: prevent parallel env var access by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1681
-   CI: fix macOS build by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1696
-   Only use `nosort` in bash <4.4 by [@&#8203;martinml](https://github.com/martinml) in dandavison/delta#1683
-   Don't read git files when --no-gitconfig is given + unused variables by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1728
-   tests: add insta for snapshot testing by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1739
-   tests: set terminal width to 43 by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1741
-   Fix panic when blame-palette is empty by [@&#8203;thorio](https://github.com/thorio) in dandavison/delta#1737
-   Make relative-paths work with binary files by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1740
-   Fix github links from master to main by [@&#8203;madeddie](https://github.com/madeddie) in dandavison/delta#1709
-   Update `terminal-colorsaurus` by [@&#8203;bash](https://github.com/bash) in dandavison/delta#1699
-   Make less version >= 633 behave like previous versions wrt. Nerd Fonts by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1762
-   Update `catppuccin-latte` casing in `LIGHT_SYNTAX_THEMES` list by [@&#8203;injust](https://github.com/injust) in dandavison/delta#1745
-   deps: bump libc from 0.2.153 to 0.2.155 by [@&#8203;wxpppp](https://github.com/wxpppp) in dandavison/delta#1715
-   Add missing `--file-*-label` option to `--navigate` docs by [@&#8203;injust](https://github.com/injust) in dandavison/delta#1744
-   Fix copy-paste typo by [@&#8203;injust](https://github.com/injust) in dandavison/delta#1767
-   Update syntect to 5.2.0 by [@&#8203;timhillgit](https://github.com/timhillgit) in dandavison/delta#1672
-   Disable light mode detection in tests by [@&#8203;bash](https://github.com/bash) in dandavison/delta#1765
-   Add --max-syntax-highlighting-length, set to 400 by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1746
-   chore: cleanup brew formula file in favor of core tap by [@&#8203;chenrui333](https://github.com/chenrui333) in dandavison/delta#1773
-   wrap --help output, fix rust 1.80 build by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1440
-   Fix delta-toggle shell script by [@&#8203;dandavison](https://github.com/dandavison) in dandavison/delta#1794
-   Do not wrap short help (-h) output by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1800
-   Implement --diff-args by [@&#8203;dandavison](https://github.com/dandavison) in dandavison/delta#1697
-   Handle ambiguous diff header, '--- ' can also be present in a minus hunk by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1787
-   cd: build binaries targeting GNU libc on ubuntu-20.04, not latest by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1805

#### New Contributors

-   [@&#8203;martinml](https://github.com/martinml) made their first contribution in dandavison/delta#1683
-   [@&#8203;thorio](https://github.com/thorio) made their first contribution in dandavison/delta#1737
-   [@&#8203;madeddie](https://github.com/madeddie) made their first contribution in dandavison/delta#1709
-   [@&#8203;injust](https://github.com/injust) made their first contribution in dandavison/delta#1745
-   [@&#8203;wxpppp](https://github.com/wxpppp) made their first contribution in dandavison/delta#1715
-   [@&#8203;timhillgit](https://github.com/timhillgit) made their first contribution in dandavison/delta#1672
-   [@&#8203;chenrui333](https://github.com/chenrui333) made their first contribution in dandavison/delta#1773

**Full Changelog**: dandavison/delta@0.17.0...0.18.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
renovate bot referenced this pull request in d-issy/dotfiles Aug 23, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dandavison/delta](https://togithub.com/dandavison/delta) | minor |
`0.17.0` -> `0.18.0` |

---

### Release Notes

<details>
<summary>dandavison/delta (dandavison/delta)</summary>

###
[`v0.18.0`](https://togithub.com/dandavison/delta/releases/tag/0.18.0)

[Compare
Source](https://togithub.com/dandavison/delta/compare/0.17.0...0.18.0)

As usual, tons of excellent contributions, all but one not by me!
[@&#8203;th1000s](https://togithub.com/th1000s) has made a huge number
of important and difficult improvements to delta and helped with many
issues over the few years since the project started, and so I'm happy to
say that he's co-maintaining the project with me nowadays. Thanks to all
contributors for the improvements below!

#### What's Changed

- Link to Repository from Manual by
[@&#8203;bash](https://togithub.com/bash) in
[https://github.com/dandavison/delta/pull/1657](https://togithub.com/dandavison/delta/pull/1657)
- Stop highlighting unchanged whitespace by
[@&#8203;phillipwood](https://togithub.com/phillipwood) in
[https://github.com/dandavison/delta/pull/1659](https://togithub.com/dandavison/delta/pull/1659)
- Add .gitattributes rules for rust files by
[@&#8203;phillipwood](https://togithub.com/phillipwood) in
[https://github.com/dandavison/delta/pull/1245](https://togithub.com/dandavison/delta/pull/1245)
- Repair --default-language, and highlight using full filename by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1549](https://togithub.com/dandavison/delta/pull/1549)
- tests: prevent parallel env var access by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1681](https://togithub.com/dandavison/delta/pull/1681)
- CI: fix macOS build by [@&#8203;th1000s](https://togithub.com/th1000s)
in
[https://github.com/dandavison/delta/pull/1696](https://togithub.com/dandavison/delta/pull/1696)
- Only use `nosort` in bash <4.4 by
[@&#8203;martinml](https://togithub.com/martinml) in
[https://github.com/dandavison/delta/pull/1683](https://togithub.com/dandavison/delta/pull/1683)
- Don't read git files when --no-gitconfig is given + unused variables
by [@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1728](https://togithub.com/dandavison/delta/pull/1728)
- tests: add insta for snapshot testing by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1739](https://togithub.com/dandavison/delta/pull/1739)
- tests: set terminal width to 43 by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1741](https://togithub.com/dandavison/delta/pull/1741)
- Fix panic when blame-palette is empty by
[@&#8203;thorio](https://togithub.com/thorio) in
[https://github.com/dandavison/delta/pull/1737](https://togithub.com/dandavison/delta/pull/1737)
- Make relative-paths work with binary files by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1740](https://togithub.com/dandavison/delta/pull/1740)
- Fix github links from master to main by
[@&#8203;madeddie](https://togithub.com/madeddie) in
[https://github.com/dandavison/delta/pull/1709](https://togithub.com/dandavison/delta/pull/1709)
- Update `terminal-colorsaurus` by
[@&#8203;bash](https://togithub.com/bash) in
[https://github.com/dandavison/delta/pull/1699](https://togithub.com/dandavison/delta/pull/1699)
- Make less version >= 633 behave like previous versions wrt. Nerd Fonts
by [@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1762](https://togithub.com/dandavison/delta/pull/1762)
- Update `catppuccin-latte` casing in `LIGHT_SYNTAX_THEMES` list by
[@&#8203;injust](https://togithub.com/injust) in
[https://github.com/dandavison/delta/pull/1745](https://togithub.com/dandavison/delta/pull/1745)
- deps: bump libc from 0.2.153 to 0.2.155 by
[@&#8203;wxpppp](https://togithub.com/wxpppp) in
[https://github.com/dandavison/delta/pull/1715](https://togithub.com/dandavison/delta/pull/1715)
- Add missing `--file-*-label` option to `--navigate` docs by
[@&#8203;injust](https://togithub.com/injust) in
[https://github.com/dandavison/delta/pull/1744](https://togithub.com/dandavison/delta/pull/1744)
- Fix copy-paste typo by [@&#8203;injust](https://togithub.com/injust)
in
[https://github.com/dandavison/delta/pull/1767](https://togithub.com/dandavison/delta/pull/1767)
- Update syntect to 5.2.0 by
[@&#8203;timhillgit](https://togithub.com/timhillgit) in
[https://github.com/dandavison/delta/pull/1672](https://togithub.com/dandavison/delta/pull/1672)
- Disable light mode detection in tests by
[@&#8203;bash](https://togithub.com/bash) in
[https://github.com/dandavison/delta/pull/1765](https://togithub.com/dandavison/delta/pull/1765)
- Add --max-syntax-highlighting-length, set to 400 by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1746](https://togithub.com/dandavison/delta/pull/1746)
- chore: cleanup brew formula file in favor of core tap by
[@&#8203;chenrui333](https://togithub.com/chenrui333) in
[https://github.com/dandavison/delta/pull/1773](https://togithub.com/dandavison/delta/pull/1773)
- wrap --help output, fix rust 1.80 build by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1440](https://togithub.com/dandavison/delta/pull/1440)
- Fix delta-toggle shell script by
[@&#8203;dandavison](https://togithub.com/dandavison) in
[https://github.com/dandavison/delta/pull/1794](https://togithub.com/dandavison/delta/pull/1794)
- Do not wrap short help (-h) output by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1800](https://togithub.com/dandavison/delta/pull/1800)
- Implement --diff-args by
[@&#8203;dandavison](https://togithub.com/dandavison) in
[https://github.com/dandavison/delta/pull/1697](https://togithub.com/dandavison/delta/pull/1697)
- Handle ambiguous diff header, '--- ' can also be present in a minus
hunk by [@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1787](https://togithub.com/dandavison/delta/pull/1787)
- cd: build binaries targeting GNU libc on ubuntu-20.04, not latest by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1805](https://togithub.com/dandavison/delta/pull/1805)

#### New Contributors

- [@&#8203;martinml](https://togithub.com/martinml) made their first
contribution in
[https://github.com/dandavison/delta/pull/1683](https://togithub.com/dandavison/delta/pull/1683)
- [@&#8203;thorio](https://togithub.com/thorio) made their first
contribution in
[https://github.com/dandavison/delta/pull/1737](https://togithub.com/dandavison/delta/pull/1737)
- [@&#8203;madeddie](https://togithub.com/madeddie) made their first
contribution in
[https://github.com/dandavison/delta/pull/1709](https://togithub.com/dandavison/delta/pull/1709)
- [@&#8203;injust](https://togithub.com/injust) made their first
contribution in
[https://github.com/dandavison/delta/pull/1745](https://togithub.com/dandavison/delta/pull/1745)
- [@&#8203;wxpppp](https://togithub.com/wxpppp) made their first
contribution in
[https://github.com/dandavison/delta/pull/1715](https://togithub.com/dandavison/delta/pull/1715)
- [@&#8203;timhillgit](https://togithub.com/timhillgit) made their first
contribution in
[https://github.com/dandavison/delta/pull/1672](https://togithub.com/dandavison/delta/pull/1672)
- [@&#8203;chenrui333](https://togithub.com/chenrui333) made their first
contribution in
[https://github.com/dandavison/delta/pull/1773](https://togithub.com/dandavison/delta/pull/1773)

**Full Changelog**:
dandavison/delta@0.17.0...0.18.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/d-issy/dotfiles).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
izumin5210 referenced this pull request in izumin5210/dotfiles Aug 31, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dandavison/delta](https://togithub.com/dandavison/delta) | minor |
`0.17.0` -> `0.18.0` |

---

### Release Notes

<details>
<summary>dandavison/delta (dandavison/delta)</summary>

###
[`v0.18.0`](https://togithub.com/dandavison/delta/releases/tag/0.18.0)

[Compare
Source](https://togithub.com/dandavison/delta/compare/0.17.0...0.18.0)

As usual, tons of excellent contributions, all but one not by me!
[@&#8203;th1000s](https://togithub.com/th1000s) has made a huge number
of important and difficult improvements to delta and helped with many
issues over the few years since the project started, and so I'm happy to
say that he's co-maintaining the project with me nowadays. Thanks to all
contributors for the improvements below!

#### What's Changed

- Link to Repository from Manual by
[@&#8203;bash](https://togithub.com/bash) in
[https://github.com/dandavison/delta/pull/1657](https://togithub.com/dandavison/delta/pull/1657)
- Stop highlighting unchanged whitespace by
[@&#8203;phillipwood](https://togithub.com/phillipwood) in
[https://github.com/dandavison/delta/pull/1659](https://togithub.com/dandavison/delta/pull/1659)
- Add .gitattributes rules for rust files by
[@&#8203;phillipwood](https://togithub.com/phillipwood) in
[https://github.com/dandavison/delta/pull/1245](https://togithub.com/dandavison/delta/pull/1245)
- Repair --default-language, and highlight using full filename by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1549](https://togithub.com/dandavison/delta/pull/1549)
- tests: prevent parallel env var access by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1681](https://togithub.com/dandavison/delta/pull/1681)
- CI: fix macOS build by [@&#8203;th1000s](https://togithub.com/th1000s)
in
[https://github.com/dandavison/delta/pull/1696](https://togithub.com/dandavison/delta/pull/1696)
- Only use `nosort` in bash <4.4 by
[@&#8203;martinml](https://togithub.com/martinml) in
[https://github.com/dandavison/delta/pull/1683](https://togithub.com/dandavison/delta/pull/1683)
- Don't read git files when --no-gitconfig is given + unused variables
by [@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1728](https://togithub.com/dandavison/delta/pull/1728)
- tests: add insta for snapshot testing by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1739](https://togithub.com/dandavison/delta/pull/1739)
- tests: set terminal width to 43 by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1741](https://togithub.com/dandavison/delta/pull/1741)
- Fix panic when blame-palette is empty by
[@&#8203;thorio](https://togithub.com/thorio) in
[https://github.com/dandavison/delta/pull/1737](https://togithub.com/dandavison/delta/pull/1737)
- Make relative-paths work with binary files by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1740](https://togithub.com/dandavison/delta/pull/1740)
- Fix github links from master to main by
[@&#8203;madeddie](https://togithub.com/madeddie) in
[https://github.com/dandavison/delta/pull/1709](https://togithub.com/dandavison/delta/pull/1709)
- Update `terminal-colorsaurus` by
[@&#8203;bash](https://togithub.com/bash) in
[https://github.com/dandavison/delta/pull/1699](https://togithub.com/dandavison/delta/pull/1699)
- Make less version >= 633 behave like previous versions wrt. Nerd Fonts
by [@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1762](https://togithub.com/dandavison/delta/pull/1762)
- Update `catppuccin-latte` casing in `LIGHT_SYNTAX_THEMES` list by
[@&#8203;injust](https://togithub.com/injust) in
[https://github.com/dandavison/delta/pull/1745](https://togithub.com/dandavison/delta/pull/1745)
- deps: bump libc from 0.2.153 to 0.2.155 by
[@&#8203;wxpppp](https://togithub.com/wxpppp) in
[https://github.com/dandavison/delta/pull/1715](https://togithub.com/dandavison/delta/pull/1715)
- Add missing `--file-*-label` option to `--navigate` docs by
[@&#8203;injust](https://togithub.com/injust) in
[https://github.com/dandavison/delta/pull/1744](https://togithub.com/dandavison/delta/pull/1744)
- Fix copy-paste typo by [@&#8203;injust](https://togithub.com/injust)
in
[https://github.com/dandavison/delta/pull/1767](https://togithub.com/dandavison/delta/pull/1767)
- Update syntect to 5.2.0 by
[@&#8203;timhillgit](https://togithub.com/timhillgit) in
[https://github.com/dandavison/delta/pull/1672](https://togithub.com/dandavison/delta/pull/1672)
- Disable light mode detection in tests by
[@&#8203;bash](https://togithub.com/bash) in
[https://github.com/dandavison/delta/pull/1765](https://togithub.com/dandavison/delta/pull/1765)
- Add --max-syntax-highlighting-length, set to 400 by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1746](https://togithub.com/dandavison/delta/pull/1746)
- chore: cleanup brew formula file in favor of core tap by
[@&#8203;chenrui333](https://togithub.com/chenrui333) in
[https://github.com/dandavison/delta/pull/1773](https://togithub.com/dandavison/delta/pull/1773)
- wrap --help output, fix rust 1.80 build by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1440](https://togithub.com/dandavison/delta/pull/1440)
- Fix delta-toggle shell script by
[@&#8203;dandavison](https://togithub.com/dandavison) in
[https://github.com/dandavison/delta/pull/1794](https://togithub.com/dandavison/delta/pull/1794)
- Do not wrap short help (-h) output by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1800](https://togithub.com/dandavison/delta/pull/1800)
- Implement --diff-args by
[@&#8203;dandavison](https://togithub.com/dandavison) in
[https://github.com/dandavison/delta/pull/1697](https://togithub.com/dandavison/delta/pull/1697)
- Handle ambiguous diff header, '--- ' can also be present in a minus
hunk by [@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1787](https://togithub.com/dandavison/delta/pull/1787)
- cd: build binaries targeting GNU libc on ubuntu-20.04, not latest by
[@&#8203;th1000s](https://togithub.com/th1000s) in
[https://github.com/dandavison/delta/pull/1805](https://togithub.com/dandavison/delta/pull/1805)

#### New Contributors

- [@&#8203;martinml](https://togithub.com/martinml) made their first
contribution in
[https://github.com/dandavison/delta/pull/1683](https://togithub.com/dandavison/delta/pull/1683)
- [@&#8203;thorio](https://togithub.com/thorio) made their first
contribution in
[https://github.com/dandavison/delta/pull/1737](https://togithub.com/dandavison/delta/pull/1737)
- [@&#8203;madeddie](https://togithub.com/madeddie) made their first
contribution in
[https://github.com/dandavison/delta/pull/1709](https://togithub.com/dandavison/delta/pull/1709)
- [@&#8203;injust](https://togithub.com/injust) made their first
contribution in
[https://github.com/dandavison/delta/pull/1745](https://togithub.com/dandavison/delta/pull/1745)
- [@&#8203;wxpppp](https://togithub.com/wxpppp) made their first
contribution in
[https://github.com/dandavison/delta/pull/1715](https://togithub.com/dandavison/delta/pull/1715)
- [@&#8203;timhillgit](https://togithub.com/timhillgit) made their first
contribution in
[https://github.com/dandavison/delta/pull/1672](https://togithub.com/dandavison/delta/pull/1672)
- [@&#8203;chenrui333](https://togithub.com/chenrui333) made their first
contribution in
[https://github.com/dandavison/delta/pull/1773](https://togithub.com/dandavison/delta/pull/1773)

**Full Changelog**:
dandavison/delta@0.17.0...0.18.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/izumin5210/dotfiles).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: izumin5210-update-aqua-checksum[bot] <169593670+izumin5210-update-aqua-checksum[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants