altsem / gitu

A TUI Git client inspired by Magit
MIT License
1.74k stars 89 forks source link

The rebase command should not use the selected commit as argument directly #60

Closed frank-lenormand closed 5 months ago

frank-lenormand commented 6 months ago

Hi,

When running an interactive rebase from the UI, it appears that Gitu runs git rebase --interactive <commit>, with commit being whatever reference was selected.

This results in the selected commit not showing up in the upcoming editor, which is surprising to a user unfamiliar with the underlying Git command.

Could we please make it so Gitu runs something along the lines of git rebase --interactive '<commit>^', instead?

I reckon this would open the door to further issues, for example if the selected commit is a merge commit, but the improvement would be appreciated in other cases.

Thanks!

altsem commented 5 months ago

:+1:

I did some testing in magit and it seems that

Makes sense that gitu would behave the same (warning about merge commits can be a future thing)