gitoxide icon indicating copy to clipboard operation
gitoxide copied to clipboard

Add `gix diff` to CLI

Open cruessler opened this issue 1 year ago • 1 comments

Summary 💡

I found that there is no gix diff yet, but I think it would be very useful in the context of developing gix blame. I searched the issue list, but as far as I could tell, there was no issue related to gix diff yet. I’d like to start working on adding gix diff if it isn’t on anyone’s todo list yet.

Motivation 🔦

This will be helpful in debugging, in particular for gix blame.

Tasks

  • [x] gix diff tree #1626

cruessler avatar Oct 14 '24 07:10 cruessler

That's a great idea and I welcome you to implement it in a first version, suitable to help with gix blame.

I may add that we should probably follow the command-hierarchy laid out by gix merge, so what you probably want to implement is gix diff tree. It can be passed two trees as rev-spec and will produce some sort of visual diff.

And indeed, the reason it's not implemented yet was that it's purely in gitoxide-core with some work needed to get the visualization nice enough to be useful.

Since it's directly motivated to help with gix blame, I think it's fair to make it so - or in other words, there is no need to try to adhere to what Git does when diffing trees.

Byron avatar Oct 14 '24 08:10 Byron

Are there any other subcommands it would make sense to implement at this point? I still have context, but for gix blame I currently don’t need more as far as I can tell.

cruessler avatar Oct 25 '24 14:10 cruessler

If it's good enough for you let's close it, I also have no plans for more right now.

Byron avatar Oct 26 '24 06:10 Byron