doesn't support git worktree
In a git worktree, there's no .git/HEAD file, so gitHeadPath will return an error path.
Consider using find-git-root instead of findup-sync
I changed the code to use find-git-root, but unfortunately that's not the only change needed, as there is no .git/HEAD either inside the worktree reference, the HEAD is directly inside the git root. @jonschlinkert if I open a PR can we get this fixed?
Yes absolutely! A PR would be great.
Sent from my iPhone
On Feb 18, 2021, at 6:18 PM, Joscha Feth [email protected] wrote:
I changed the code to use find-git-root, but unfortunately that's not the only change needed, as there is no .git/HEAD either inside the worktree reference, the HEAD is directly inside the git root. @jonschlinkert if I open a PR can we get this fixed?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
here you go: https://github.com/jonschlinkert/git-branch/pull/14
Any chance to get this in?
On Fri, 19 Feb 2021, 10:53 Jon Schlinkert, [email protected] wrote:
Yes absolutely! A PR would be great.
Sent from my iPhone
On Feb 18, 2021, at 6:18 PM, Joscha Feth [email protected] wrote:
I changed the code to use find-git-root, but unfortunately that's not the only change needed, as there is no .git/HEAD either inside the worktree reference, the HEAD is directly inside the git root. @jonschlinkert if I open a PR can we get this fixed?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jonschlinkert/git-branch/issues/10#issuecomment-781712076, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABN5BTRENW3NHVVHXZ6D3LS7WSADANCNFSM4LQXYJXQ .
@jonschlinkert please let me know if there is anything else I can do to get this in. The PR is fairly minimally invasive adds a test and will allow us to close a few other issues. Would be great to get it merged. If you do not want to merge it, that is okay as well, but please let me know as then I might fork this project and publish it independently.
one last attempt - ping @jonschlinkert ?
If this is about the work of the npm publish itself I am happy to do it of you add me to the package.
That would be great to get it in, @jonschlinkert
Nice fix @joscha hope it gets merged soon.
+1
Any updates on this? It would be great to get this merged in!
It's probably a worthwhile idea to publish a fork if this package is abandoned.
I published the fixes for this via https://www.npmjs.com/package/@fork-of/git-branch