wfxr / forgit

:zzz: A utility tool powered by fzf for using git interactively.
MIT License
4.32k stars 136 forks source link

Fix broken cherry picking #294

Closed carlfriedrich closed 1 year ago

carlfriedrich commented 1 year ago

Check list

Description

With the changes of #261 and #266 we accidentally broke the return value of _forgit_cherry_pick, which led to the loop in _forgit_cherry_pick_from_branch being terminated in the wrong cases. Fix this by moving all the post processing after fzf to a later call.

Also simplify the array population using a single line instead of a loop.

This should also fix #286 ("fatal: bad revision ''").

Type of change

Test environment

sandr01d commented 1 year ago

Hey @carlfriedrich, thanks for moving this forward. I wasn't sure how to progress with #286 since I couldn't reproduce the outstanding issue. This works fine in my environment.