git🐮 Fix stderr redirection

I also swapped the printf and the redirection since I think I prefer it
this way.
This commit is contained in:
2025-09-21 01:34:48 +02:00
parent 2dd1a80036
commit 1c5beed613

View File

@@ -49,7 +49,7 @@ fi
trap '
errc=$?
<&2 printf "Exiting abnormally. Check and possibly remove \"%s\" manually.\n" "'"$WORKTREE_PATH"'"
printf >&2 "Exiting abnormally. Check and possibly remove \"%s\" manually.\n" "'"$WORKTREE_PATH"'"
return $errc
' INT QUIT TERM EXIT
@@ -77,7 +77,7 @@ unset GIT_PREFIX
# Restart the shell (forcefully interactive) until the worktree is removed
until [[ ! -e "$WORKTREE_PATH" ]] || git worktree remove "$WORKTREE_PATH"; do
[[ -t 0 ]] ||
>&2 printf "Dropping into interactive shell to resolve conflicts\n"
printf >&2 "Dropping into interactive shell to resolve conflicts\n"
"$SHELL" -i && errc=$? || errc=$?
(( !errc )) || echo "shell exited with $errc"
done