Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED] getBranchName fails on empty repo #2

Closed
rlopezcc opened this issue Aug 2, 2017 · 0 comments
Closed

[FIXED] getBranchName fails on empty repo #2

rlopezcc opened this issue Aug 2, 2017 · 0 comments

Comments

@rlopezcc
Copy link
Contributor

rlopezcc commented Aug 2, 2017

Following sophilabs/gilp#2

Just got to replicate it and stack trace shows:
at Object.gilpUtil.getBranchName (/Users/rlopez/work/test-repo/node_modules/gilp-util/lib/index.js:22:10)

git rev-parse --abbrev-ref HEAD doesn't work in this case

Someone on stackoverflow suggests:
git symbolic-ref --short HEAD
Which actually works.

pricco added a commit that referenced this issue Aug 2, 2017
Fix issue #2, change command to get branch name.
@rlopezcc rlopezcc changed the title getBranchName fails on empty repo [FIXED] getBranchName fails on empty repo Aug 3, 2017
@rlopezcc rlopezcc closed this as completed Aug 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant