Allow passing parameters to reset_head

This commit is contained in:
sandroid 2023-05-26 21:41:47 +02:00
parent 99cda3248c
commit 81e0d1c66c
No known key found for this signature in database
GPG key ID: 91418C9982B8B76E

View file

@ -192,6 +192,7 @@ _forgit_add() {
# git reset HEAD (unstage) selector
_forgit_reset_head() {
_forgit_inside_work_tree || return 1
[[ $# -ne 0 ]] && git reset -q "$@" && git status --short && return
local git_reset_head cmd files opts rootdir
git_reset_head="git reset -q $FORGIT_RESET_HEAD_GIT_OPTS HEAD"
rootdir=$(git rev-parse --show-toplevel)