🐛 Colors break commit hyperlinks since upgrade to 0.19.2
- Dominant language
- Rust
- Stars
- 32.2k
- Forks
- 572
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Description
Hi,
On version 0.18.2, I am able to have hyperlinks render when using `git log` with a `--pretty` format that shows commit hashes in a color:
(It's a little hard to see, but it created a hyperlink)
On version 0.19.2, the same pretty format suppresses the hyperlinks; they appear when not showing the commit in red, but not when I do:
(It's a little hard to see, but the second `git log` call created a hyperlink while the other three didn't)
```shell
gorfe:LS\delta:pwsh> git --no-pager log -1 --pretty=format:'%h'
f85c46b
gorfe:LS\delta:pwsh> git log -1 --pretty=format:'%h'
f85c46b
gorfe:LS\delta:pwsh> git --no-pager log -1 --pretty=format:'%Cred%h%Creset'
f85c46b
gorfe:LS\delta:pwsh> git log -1 --pretty=format:'%Cred%h%Creset'
f85c46b
gorfe:LS\delta:pwsh> delta --version
delta 0.19.2
```
I would expect `git log -1 --pretty=format:'%Cred%h%Creset'` to produce a hyperlink, just like `git log -1 --pretty=format:'%h` did. It would be nice if I could both get hyperlinks and have colorful log messages.
Contributor guide
Research direction
Reproduce the regression with delta 0.19.2 using the four git log commands shown, comparing colored and uncolored commit hashes and hyperlink behavior. Trace the Rust code responsible for processing colors and commit hyperlinks; done means `%Cred%h%Creset` retains a hyperlink just like `%h`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 57/100