Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ release:
local cmd="$1"

# Commands that should change directory
if [[ "$cmd" == "add" || "$cmd" == "switch" || "$cmd" == "sw" ]]; then
if [[ "$cmd" == "add" || "$cmd" == "switch" || "$cmd" == "sw" || "$cmd" == "setup" ]]; then
# Capture stderr to look for WT_CHDIR while preserving stdout and interactive TUI
local temp_file
temp_file=$(mktemp)
Expand Down Expand Up @@ -150,7 +150,7 @@ release:
fi
}
```
After adding this function and restarting your shell (or running `source ~/.bashrc`/`source ~/.zshrc`), the `worktree add` and `worktree switch` commands will automatically change your current directory to the worktree location.
After adding this function and restarting your shell (or running `source ~/.bashrc`/`source ~/.zshrc`), the `worktree add`, `worktree switch`, and `worktree setup` commands will automatically change your current directory to the worktree location.

### Verification with Checksums
Download `checksums.txt` and verify your binary:
Expand Down
7 changes: 0 additions & 7 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ func TestWorktreeFullWorkflow(t *testing.T) {
require.NoError(t, err, "Failed to setup repository: %s", string(output))
t.Logf("Setup output: %s", string(output))

// Verify repository structure was created
assert.DirExists(t, "worktree", "Repository directory should exist")

// Change into repository directory
err = os.Chdir("worktree")
require.NoError(t, err)

// Verify basic repository structure
assert.DirExists(t, ".bare", "Bare repository should exist")
assert.FileExists(t, ".git", "Git directory file should exist")
Expand Down
2 changes: 1 addition & 1 deletion worktree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ worktree() {
local cmd="$1"

# Commands that should change directory
if [[ "$cmd" == "add" || "$cmd" == "switch" || "$cmd" == "sw" ]]; then
if [[ "$cmd" == "add" || "$cmd" == "switch" || "$cmd" == "sw" || "$cmd" == "setup" ]]; then
# Capture stderr to look for WT_CHDIR while preserving stdout and interactive TUI
local temp_file
temp_file=$(mktemp)
Expand Down