Escape-Technologies / mookme

A pre-commit tool designed for monorepos.
MIT License
102 stars 13 forks source link

fix: add support for worktree #128

Open conradob opened 6 months ago

conradob commented 6 months ago

When working with git worktree, the Git folder path is different between worktrees and the main tree.

Main working dir:

$ git rev-parse --git-common-dir
.git

Worktree:

git rev-parse --git-common-dir
/Users/some_user/projects/mookme

This PR intends to add support for git worktree by getting the git directory from the git rev-parse --git-common-dir command.

When dealing with the main working directory, it is important to handle the absolute path.

Close #127

robert-melonn commented 2 weeks ago

@conradob is this project abandoned or deprecated? Im seeing some opened issues and prs. I want to try hookme for my organization