Closed
Description
Description
Git-semver fails when launched from a subdirectory, wherease git describe
succeeds.
Steps to reproduce
mkdir -p test/foo
cd test
git init
touch foo/bar
git add foo/bar
git commit -m"init"
git tag -a 0.1.0 -m"release"
cd foo
git describe
# 0.1.0
git-semver
# failed to open repo: repository does not exist
Fix
I will PR later, but I think the problem lies here. According to this post, you should call git.PlainOpenWithOptions
instead of git.PlainOpen
. The option structure is declared here and should have the attribute DetectDotGit
set to true.
Metadata
Metadata
Assignees
Labels
No labels