-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create hook receives incomplete path #102
Comments
I fixed the issue in my -- If we're dealing with create, the path is relative to the worktree and not absolute
-- so we need to convert it to an absolute path.
local new_path = metadata.path
if not Path:new(new_path):is_absolute() then
new_path = Path:new():absolute()
if new_path:sub(-#'/') == '/' then
new_path = string.sub(new_path, 1, string.len(new_path) - 1)
end
end Hope that it helps 🙏 |
Hi @bjufre |
I don't think so; my PR and others have been sitting unreviewed for a while as well; I'd be happy to submit my PR to your fork instead, @halfdan - we need to move on and use each other's improvements. |
@TamaMcGlinn let's do it - I'll spend some time to cherry-pick existing PRs and get them merged into my fork where appropriate. |
@halfdan I did see we don't technically have permission; it seemed implied, for my part, since he did a video on git-worktree. |
@TamaMcGlinn Sent an email to @ThePrimeagen to ask whether he could add people as contributors to the repo. I'll give him some time to respond before moving forward with the fork. |
The switch and delete hook receive the absolute path to the worktree whereas the Create hook only receives the relative path. This is inconsistent. It's useful to consolidate this to always pass the absolute path as it can then be used as cwd in downstream jobs.
The text was updated successfully, but these errors were encountered: