serie icon indicating copy to clipboard operation
serie copied to clipboard

feature request: diff in commit detail

Open zachvalenta opened this issue 1 year ago • 2 comments

Really like the project, prefer the UI to tig, but one feature that I find very useful about tig is that you can drill down to the content of the diff:

Screenshot 2024-10-15 at 9 14 44 PM

but this functionality doesn't seem to be present in serie:

Screenshot 2024-10-15 at 9 14 55 PM

Read the README, adding this functionality doesn't seem to be against the project's design goals. Let me know what you think and great work with the project!

zachvalenta avatar Oct 16 '24 01:10 zachvalenta

I'll second this one, specially if the diff is not just a raw diff but something like delta displays.

nkh avatar Oct 31 '24 18:10 nkh

I'll second this one, specially if the diff is not just a raw diff but something like delta displays.

or BYO pager i.e. just config whether you want to use delta or diff-so-fancy, et. al.

zachvalenta avatar Oct 31 '24 18:10 zachvalenta

Very nice, thanks @lusingander! Could you please show the "User command" you used to configure delta? Thanks!

simono avatar Aug 31 '25 15:08 simono

Very nice, thanks @lusingander! Could you please show the "User command" you used to configure delta? Thanks!

Hi Simon, you can use this config:

[keybind]
user_command_view_toggle_1 = ["d"]

[core.user_command]
commands_1 = { name = "git diff ", commands = ["sh", "-c", "git diff --color=always {{first_parent_hash}} {{target_hash}} | delta"] }

rcapraro avatar Sep 10 '25 16:09 rcapraro

Building on @rcapraro response, and in case anyone else runs into this - I found that you'll most likely need to pass the width variable to delta in the subshell to avoid funky wrapping issues (i.e.):

commands_1 = { name = "git diff (delta)", commands = ["sh", "-c", "git diff --color=always {{first_parent_hash}} {{target_hash}} | delta --width={{area_width}}"] }

CarbonChauvinist avatar Nov 03 '25 15:11 CarbonChauvinist