From 43d87467d24a6659cd11eada41dcecc2e211a6f6 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Tue, 12 Jul 2022 17:48:27 +0200 Subject: [PATCH] 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. --- .config/zsh/autoload/git/git-checkout-worktree | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/zsh/autoload/git/git-checkout-worktree b/.config/zsh/autoload/git/git-checkout-worktree index d5f8e9b..5f9a81e 100755 --- a/.config/zsh/autoload/git/git-checkout-worktree +++ b/.config/zsh/autoload/git/git-checkout-worktree @@ -36,7 +36,7 @@ trap ' return $errc ' INT QUIT TERM EXIT -git worktree add "$WORKTREE_PATH" "$1" +git worktree add "$WORKTREE_PATH" "$@" pushd -q "$WORKTREE_PATH" "$SHELL" && errc=$? || errc=$?