git:checkout-worktree: Rephrase description

This commit is contained in:
2022-03-31 15:27:29 +02:00
parent f44125937f
commit b44ff72210

View File

@@ -1,7 +1,10 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
# Creates a git worktree checking it out the first argument in a temporary # Checks out the first argument in a worktree at a temporary directory. Then
# directory that is deleted again, if the spawned subshell exits. # 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 local GIT_ROOT TEMP_DIR REPO_DIR
GIT_ROOT="$(basename "$(git rev-parse --show-toplevel)")" || return GIT_ROOT="$(basename "$(git rev-parse --show-toplevel)")" || return