From 9352f3611f1fb9ba93a7b1da68dd958605b650ee Mon Sep 17 00:00:00 2001 From: sandroid Date: Tue, 30 May 2023 21:29:05 +0200 Subject: [PATCH] Use $git_reset_head --- bin/git-forgit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-forgit b/bin/git-forgit index 2de4923..0cf67b2 100755 --- a/bin/git-forgit +++ b/bin/git-forgit @@ -192,9 +192,9 @@ _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" + [[ $# -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="