Bug 259753

Summary: [git-webkit] setup ends up hardcoding worktree path in hooks
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: Tools / TestsAssignee: Sam Sneddon [:gsnedders] <gsnedders>
Status: RESOLVED FIXED    
Severity: Normal CC: emw, jbedard, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Sam Sneddon [:gsnedders] 2023-08-02 15:26:32 PDT
`git-webkit setup` ends up inserting a line such as:

```
LOCATION = r'/Volumes/gsnedders/projects/Safari/OS2/Tools/Scripts/hooks/prepare-commit-msg'
```

However, in my case, this has ended up with a path within a worktree hardcoded in the hook. This… stopped working when I pruned the worktree.

We should, at most, hardcode the path from the top-level directory of the working tree, and then just use the current working tree.
Comment 1 Radar WebKit Bug Importer 2023-08-02 15:26:44 PDT
<rdar://problem/113294324>
Comment 2 Sam Sneddon [:gsnedders] 2023-08-02 15:52:31 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16332
Comment 3 EWS 2023-08-04 03:45:10 PDT
Committed 266577@main (3aa38b6cb9f2): <https://commits.webkit.org/266577@main>

Reviewed commits have been landed. Closing PR #16332 and removing active labels.