Skip to content
Open
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
6 changes: 3 additions & 3 deletions claude_wt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def resume(branch_name: str):
break
current_wt = {"path": line[9:]}
elif line.startswith("branch "):
current_wt["branch"] = line[7:]
current_wt["branch"] = line[7:].removeprefix("refs/heads/")

# Check the last worktree entry
if current_wt and current_wt.get("branch") == full_branch_name:
Expand Down Expand Up @@ -335,7 +335,7 @@ def clean(
worktrees.append(current_wt)
current_wt = {"path": line[9:]}
elif line.startswith("branch "):
current_wt["branch"] = line[7:]
current_wt["branch"] = line[7:].removeprefix("refs/heads/")
if current_wt:
worktrees.append(current_wt)

Expand Down Expand Up @@ -453,7 +453,7 @@ def list():
worktrees.append(current_wt)
current_wt = {"path": line[9:]} # Remove 'worktree ' prefix
elif line.startswith("branch "):
current_wt["branch"] = line[7:] # Remove 'branch ' prefix
current_wt["branch"] = line[7:].removeprefix("refs/heads/") # Remove 'branch refs/heads/' prefix
if current_wt:
worktrees.append(current_wt)

Expand Down