altsem / gitu

A TUI Git client inspired by Magit
MIT License
1.66k stars 87 forks source link

fix: redraw screen even if command failed #120

Closed golden-expiriensu closed 3 months ago

golden-expiriensu commented 3 months ago

fix: https://github.com/altsem/gitu/issues/113 I still trying to figure out how to do not left garbage in the stash without crutches... Any ideas are welcome!

refs: https://github.com/altsem/gitu/pull/103#issuecomment-2027478578, https://github.com/altsem/gitu/pull/73#discussion_r1527529800, https://github.com/magit/magit/blob/a334412159984dcdcff3dbb56c7c1e77197cc36c/lisp/magit-stash.el#L150, https://github.com/magit/magit/blob/a334412159984dcdcff3dbb56c7c1e77197cc36c/lisp/magit-stash.el#L386

altsem commented 3 months ago

Ah that's why the screen wouldn't update. Nice find! :D It's strange how the command returns an error-code and still stashes something.. :thinking:

The fix seems like a no-brainer. If you feel you want it merged, should i cherry-pick it and leave the draft PR, or merge this one and create a new?

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.75%. Comparing base (bbf9f76) to head (0c2b58a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #120 +/- ## ======================================= Coverage 87.75% 87.75% ======================================= Files 43 43 Lines 3774 3774 ======================================= Hits 3312 3312 Misses 462 462 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

golden-expiriensu commented 3 months ago

Ah that's why the screen wouldn't update. Nice find! :D It's strange how the command returns an error-code and still stashes something.. :thinking:

The fix seems like a no-brainer. If you feel you want it merged, should i cherry-pick it and leave the draft PR, or merge this one and create a new?

Yeah, let's merge this little fix. I will play with stashes locally later..