From b44ff72210b1ff4281c7421c99189ee25c60c75f Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 31 Mar 2022 15:27:29 +0200 Subject: [PATCH] git:checkout-worktree: Rephrase description --- .config/zsh/autoload/git/git-checkout-worktree | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/zsh/autoload/git/git-checkout-worktree b/.config/zsh/autoload/git/git-checkout-worktree index f12691a..9caa16a 100755 --- a/.config/zsh/autoload/git/git-checkout-worktree +++ b/.config/zsh/autoload/git/git-checkout-worktree @@ -1,7 +1,10 @@ #!/usr/bin/env zsh -# Creates a git worktree checking it out the first argument in a temporary -# directory that is deleted again, if the spawned subshell exits. +# Checks out the first argument in a worktree at a temporary directory. Then +# spawns an interactive shell inside of it. +# When the shell closes the worktree is tried to be removed. Until that works +# without problems (e.g. dirty), a new shell is spawned to resolve all conflicts +# (e.g. stashing). Finally the temporary directory is deleted. local GIT_ROOT TEMP_DIR REPO_DIR GIT_ROOT="$(basename "$(git rev-parse --show-toplevel)")" || return