Bug 259753 - [git-webkit] setup ends up hardcoding worktree path in hooks
Summary: [git-webkit] setup ends up hardcoding worktree path in hooks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Sneddon [:gsnedders]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-02 15:26 PDT by Sam Sneddon [:gsnedders]
Modified: 2023-08-04 03:45 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.