kurttheviking / git-rev-sync-js

Synchronously get the current git commit hash, tag, or branch
MIT License
169 stars 57 forks source link

Handle worktrees under Windows #50

Open artem-karpenko opened 4 years ago

artem-karpenko commented 4 years ago

Current implementation: 1) throws an error when ran for a worktree under Windows due to different path separators. 2) does not account for change of git directory in case it's a worktree directory when looking for packed-refs.

This PR fixes both issues.