You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Review feedback: resolve core.hooksPath only when configured, avoid an
unconditional git rev-parse dependency, and cover relative paths in a non-bare
repository.
- Read the effective Git configuration directly so unconfigured repositories
retain the legacy .git/hooks lookup and configured relative paths resolve from
the directory where hooks execute. Exercise both guarantees in the hook tests.
- Review feedback: core.hooksPath can point outside index.repo.working_dir,
where Path.relative_to() raises on Windows and prevents a valid hook from
running.
- Build the Bash argument with os.path.relpath so hooks in parent or other
absolute locations remain executable. Fall back to the absolute POSIX-form
path when Windows cannot form a relative path across drives, and add a focused
command-construction regression test.
0 commit comments