What happened?
I installed hunk using the nix flake and enabled the git integration using the home-manager module and enabling enableGitIntegration.
I have git configured so that it highlights / colors the output of git log and git commands with aliases.
Try for example the following command:
git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim white)- %an%C(reset)%n'' %C(white)%s%C(reset)' --all
With hunk pager defined as git's core.pager, this is now colorless.
But using eg GIT_PAGER=less git log --graph <etc.>, it is colored.
I'm coming from difftastic, where this works, though it is configured as a diff.external command, which probably won't work for hunk due to its interactive UI.
I expected that hunk keeps the highlighting intact, as less does when used as pager.
Steps to reproduce
- Use the home-manager module, enable hunk and its git integration
- Go to a git repository with non-empty history
- Run and compare the two git commands
git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim white)- %an%C(reset)%n'' %C(white)%s%C(reset)' --all is colorless
GIT_PAGER=less git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim white)- %an%C(reset)%n'' %C(white)%s%C(reset)' --all is colored
Expected behavior
Hunk doesn't strip the coloring of git log and friends
Version
0.14.0
What happened?
I installed hunk using the nix flake and enabled the git integration using the home-manager module and enabling
enableGitIntegration.I have git configured so that it highlights / colors the output of
git logand git commands with aliases.Try for example the following command:
With
hunk pagerdefined as git'score.pager, this is now colorless.But using eg
GIT_PAGER=less git log --graph <etc.>, it is colored.I'm coming from difftastic, where this works, though it is configured as a
diff.externalcommand, which probably won't work for hunk due to its interactive UI.I expected that hunk keeps the highlighting intact, as
lessdoes when used as pager.Steps to reproduce
git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim white)- %an%C(reset)%n'' %C(white)%s%C(reset)' --allis colorlessGIT_PAGER=less git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim white)- %an%C(reset)%n'' %C(white)%s%C(reset)' --allis coloredExpected behavior
Hunk doesn't strip the coloring of git log and friends
Version
0.14.0