From f8e4bb1921e24deea1a254892511edf3d6ae9fce Mon Sep 17 00:00:00 2001 From: Wenxuan Zhang Date: Sat, 17 Jun 2023 21:29:25 +0800 Subject: [PATCH] Revert debug changes Signed-off-by: Wenxuan Zhang --- bin/git-forgit | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/git-forgit b/bin/git-forgit index 0f20695..45d323f 100755 --- a/bin/git-forgit +++ b/bin/git-forgit @@ -164,7 +164,10 @@ _forgit_add() { untracked=$(git config --get-color color.status.untracked red) # NOTE: paths listed by 'git status -su' mixed with quoted and unquoted style # remove indicators | remove original path for rename case | remove surrounding quotes - extract="sed 's/^.*] //' | sed 's/.* -> //' | sed -e 's/^\\\"//' -e 's/\\\"\$//'" + extract=" + sed 's/^.*] //' | + sed 's/.* -> //' | + sed -e 's/^\\\"//' -e 's/\\\"\$//'" preview=" file=\$(echo {} | $extract) if (git status -s -- \\\"\$file\\\" | grep '^??') &>/dev/null; then # diff with /dev/null for untracked files