wfxr / forgit

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

Refactor: Replace deferred code in edit commands with functions #361

Closed sandr01d closed 3 months ago

sandr01d commented 3 months ago

Check list

Description

_forgit_diff and _forgit_add allow editing the currently previewed file in the EDITOR. This used to be handled entirely using deferred code. This PR replaces the deferred code and binds the commands to functions instead.

Note

This PR belongs to #326 and resulted from discussions in #324.

Type of change

Test environment

sandr01d commented 3 months ago

@carlfriedrich Scratch my earlier comment about doing _forgit_extract_sha first. Looking into this I figured that doint the execute-silent commands first will add less friction.

sandr01d commented 3 months ago

Good finds @carlfriedrich, thanks! I've implemented as requested. Rerequesting your review.

sandr01d commented 3 months ago

Changes have been merged with #326