git:checkout-worktree: Pass all arguments

Pass all given arguments to `git worktree add`. This makes it possible
to directly create a new branch with `-b` for example. As the arguments
are not used anywhere else, this should not introduce any parsing
issues.
This commit is contained in:
2022-07-12 17:48:27 +02:00
parent e949ffefef
commit 43d87467d2

View File

@@ -36,7 +36,7 @@ trap '
return $errc return $errc
' INT QUIT TERM EXIT ' INT QUIT TERM EXIT
git worktree add "$WORKTREE_PATH" "$1" git worktree add "$WORKTREE_PATH" "$@"
pushd -q "$WORKTREE_PATH" pushd -q "$WORKTREE_PATH"
"$SHELL" && errc=$? || errc=$? "$SHELL" && errc=$? || errc=$?