From 0bedb80c1f16d16385f5b1f0690642cad80148e4 Mon Sep 17 00:00:00 2001 From: sandr01d <88739791+sandr01d@users.noreply.github.com> Date: Wed, 31 May 2023 21:18:13 +0200 Subject: [PATCH] Allow passing parameters to forgit::reset::head (#309) --- bin/git-forgit | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/git-forgit b/bin/git-forgit index 9c465b3..c0f75d9 100755 --- a/bin/git-forgit +++ b/bin/git-forgit @@ -194,6 +194,7 @@ _forgit_reset_head() { _forgit_inside_work_tree || return 1 local git_reset_head cmd files opts rootdir git_reset_head="git reset -q $FORGIT_RESET_HEAD_GIT_OPTS HEAD" + [[ $# -ne 0 ]] && $git_reset_head "$@" && git status --short && return rootdir=$(git rev-parse --show-toplevel) cmd="git diff --staged --color=always -- $rootdir/{} | $_forgit_diff_pager " opts="