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
{{ message }}
Repository navigation
[rush] Git hooks feature causes Rush commands to fail in worktrees #990
If the current directory is a Git worktree (rather than a full copy of a repo), the new Git hooks feature causes rush commands to fail:
Rush Multi-Project Build Tool 5.5.3 - https://rushjs.io
Starting "rush install"
Ignoring Git validation because this is not a Git working folder.
Found files in the "common/git-hooks" folder.
ERROR: EEXIST: file already exists, mkdir 'D:\git\fabric-react2\.git'
This is because instead of having a .git directory, a worktree has a .gitfile containing the path to the real Git metadata directory. For example:
I just made a change to git-repo-info to make it return the directories containing Git metadata for the worktree and for the repo all-up. Once that's published, Rush can be updated to put hooks in the correct directory for the current worktree.
(If anyone is curious, this blog post has a good explanation of the appeal of worktrees.)
changed the title [-]Git hooks feature causes Rush commands to fail in worktrees[/-][+][rush] Git hooks feature causes Rush commands to fail in worktrees[/+]on Dec 13, 2018
Activity
ecraig12345 commentedon Dec 13, 2018
Nicholas Whittaker (@nchlswhttkr) Pete Gonzalez (OLD ALIAS) (@pgonzal) Natalie Ethell (@natalieethell) FYI -- I plan to fix this myself, but wanted to let you know about the issue since you've done (or reviewed) related work.
[-]Git hooks feature causes Rush commands to fail in worktrees[/-][+][rush] Git hooks feature causes Rush commands to fail in worktrees[/+]octogonz commentedon Dec 13, 2018
Thanks very much Elizabeth Craig (@ecraig12345) !