Loading bin/git-supertree +6 −3 Original line number Diff line number Diff line Loading @@ -163,15 +163,15 @@ new_worktree() WT_REPO=".git/worktrees/$WORKTREE" mkdir -p -- "$WORKTREE" "$WT_REPO" PREFIX=gitdir gitlink $WT_GIT $WT_REPO REL=.git gitlink "$WT_REPO/gitdir" "$WT_GIT" gitlink "$WT_REPO/commondir" .git gitlink "$WT_REPO/gitdir" "$WT_GIT" echo "ref: refs/heads/$NAME" > "$WT_REPO/HEAD" } gitlink() { printf "${PREFIX+$PREFIX: }" realpath --relative-to=$(dirname $1) $2 realpath --relative-to=${REL-$(dirname $1)} $2 } > $1 Loading Loading @@ -350,7 +350,10 @@ action_rm() if is_subdirectory "$BRANCH"; then local BRANCH_NAME=$(GIT_DIR="$BRANCH/.git" git rev-parse --abbrev-ref HEAD) rm -r "$BRANCH" ( cd $(git rev-parse --git-common-dir) git worktree prune ) else arg_error "The first argument must be a worktree name" fi Loading Loading
bin/git-supertree +6 −3 Original line number Diff line number Diff line Loading @@ -163,15 +163,15 @@ new_worktree() WT_REPO=".git/worktrees/$WORKTREE" mkdir -p -- "$WORKTREE" "$WT_REPO" PREFIX=gitdir gitlink $WT_GIT $WT_REPO REL=.git gitlink "$WT_REPO/gitdir" "$WT_GIT" gitlink "$WT_REPO/commondir" .git gitlink "$WT_REPO/gitdir" "$WT_GIT" echo "ref: refs/heads/$NAME" > "$WT_REPO/HEAD" } gitlink() { printf "${PREFIX+$PREFIX: }" realpath --relative-to=$(dirname $1) $2 realpath --relative-to=${REL-$(dirname $1)} $2 } > $1 Loading Loading @@ -350,7 +350,10 @@ action_rm() if is_subdirectory "$BRANCH"; then local BRANCH_NAME=$(GIT_DIR="$BRANCH/.git" git rev-parse --abbrev-ref HEAD) rm -r "$BRANCH" ( cd $(git rev-parse --git-common-dir) git worktree prune ) else arg_error "The first argument must be a worktree name" fi Loading