git-up / GitUp

The Git interface you've been missing all your life has finally arrived.
http://gitup.co
GNU General Public License v3.0
11.5k stars 1.26k forks source link

Feature request: Speed up staging diff workflow #750

Open tabrs opened 3 years ago

tabrs commented 3 years ago

Hello, I'm new to GitUp, so I do appologize if such a features already exists. Before opening this ticket I've searched across the Google without a luck.

Can't say what about other users, but I'm struggling while checking changes made and preparing these changes to staging. Side-by-side view is great and prefer that before the unified one, but in side-by-side it isn't easily possible to discard or stage changes in both panes without manually marking lines in one panel, do the stage or discard action, mark opposing lines in another pane, and then do the stage or discard action again.

Is there any possibility to add at least one of following features?

Additionally, it would be great to have the list of shortcust directly in the application. Maybe I`ve overlooked something or did not dig deeper, but I've not found it. What about adding a link to a website just to a Preference window?

Thanks a lot.

Regards, TA

lucasderraugh commented 3 years ago

Definitely could see adding a "View" menu option to toggle the diff appearance setting. To your second point I'm not too sure how you'd control which lines get selected on the other side of the split. Meaning if I select lines 200-203 and they were just added on one side, what would I be selected on the other?

Thanks for making the suggestion.

tabrs commented 3 years ago

Hello Lucas, thanks for the answer.

To that second point - I can imagine some kind of algorithm which will be able to recognize changed parts in a selected chunk and find that corresponding chunk on the other side. I guess that's the real deal - to find that. But since I'm not sure how you're exactly handle these diffs, I'm not directly able to suggest anything particular.

Result may be looking something like this

image

I guess I'm not the one who can help with the code. Anyway I admit, it was unusual and very satisfying to meet GitUp! It's a nice piece of software! You guys are doing really good job.

lucasderraugh commented 3 years ago

I'd have to dive into the implementation myself to see how it could be done, but definitely a good suggestion. Glad you found us!

tabrs commented 3 years ago

Thanks a lot Lucas!

wcooley commented 2 years ago

Came here to ask for the keyboard shortcut & View menu option to switch between automatic, unified & side-by-side diffs. Now that I can scale the font, a larger, more comfortable font makes so I cannot have side-by-side automatically. Even before, leaving it on automatic and switching by resizing the left Working Directory/Index column (or the whole window) seemed clunky.

So +1 to that suggestion.

(Another option might be having something in the toolbar, like additional/long/keyboard-modifier clicks on the "Commit" view icon.)

As for the other issue of selecting lines in side-by-side, I have wished for that too. Even being able to have lines selected in both sides at once would be an improvement; seeing things in an intermediate state, where one side has been staged but not the other, can be confusing at times.

sesam commented 2 years ago

Did you also try to zoom the window to full-screen mode while you're working in side-by-side mode?

I tried side-by-side but soon stopped, and for >2 years I set the Preference to never use never use side-by-side, and I've also started to think and split code changes in smaller chunks and try making sure to avoid unreadable diffs. This also helps all my colleagues who didn't get used to using gitup. (Some programming languages may make that hard to enable without splitting into lots and lots of small files. But maybe small files is good :) And so I'm kind of seeing the troubles with side-by-side as a feature.

stavfx commented 1 month ago

Another +1 to add the toggle between Unified and Side-by-Side to the commit window, rather than somewhere in Preferences. Maybe even in the menu bar? Inside the View menu could work 🤷 Keyboard shortcut would be nice too 🙏