File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1111 }
1212 ]
1313 }
14+ ],
15+ "WorktreeCreate" : [
16+ {
17+ "hooks" : [
18+ {
19+ "type" : " command" ,
20+ "command" : " bash -c 'INPUT=$(cat); NAME=$(echo \" $INPUT\" | jq -r .name); REPO=$(echo \" $INPUT\" | jq -r .cwd); PARENT=$(dirname \" $REPO\" ); DIR=\" $PARENT/$(basename \" $REPO\" )-$NAME\" ; git -C \" $REPO\" worktree add \" $DIR\" -b \" worktree-$NAME\" >&2 && echo \" $DIR\" '"
21+ }
22+ ]
23+ }
24+ ],
25+ "WorktreeRemove" : [
26+ {
27+ "hooks" : [
28+ {
29+ "type" : " command" ,
30+ "command" : " bash -c 'INPUT=$(cat); WPATH=$(echo \" $INPUT\" | jq -r .worktree_path); REPO=$(git -C \" $WPATH\" rev-parse --path-format=absolute --git-common-dir 2>/dev/null | sed \" s|/.git$||\" ); git -C \" $REPO\" worktree remove \" $WPATH\" 2>/dev/null; rm -rf \" $WPATH\" '"
31+ }
32+ ]
33+ }
1434 ]
1535 }
1636}
You can’t perform that action at this time.
0 commit comments