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
I believe I've discovered a bug in versioneer. Here's an example repos:
$ git log --format=oneline --abbrev-commit --decoratee85b611 (HEAD, master) + Added gitignoree19e5a6 + Added .gitattributesd3f82ec + Added example files0098d7a + Added versioneer
$ git tag -a 0.1 -m 0.1 e19e5a6
$ ./setup.py -V0.1+1.ge85b611
$ mkdir head && git archive --format=tar HEAD | tar -C head -x
$ mkdir head-parent && git archive --format=tar 'HEAD~1'| tar -C head-parent -x
$ cd head && ./setup.py versionrunning versiondiscarding 'HEAD,master', no digitslikely tags:no suitable tags, using unknown + full revision idgot version from expanded keyword {'error': 'no suitable tags', 'date': None, 'version': '0+unknown', 'dirty': False, 'full-revisionid': 'e85b611532c7611077ffd2bf2eeb039d76b2e61a'}Version: 0+unknown full-revisionid: e85b611532c7611077ffd2bf2eeb039d76b2e61a dirty: False date: None error: no suitable tags
$ cd head-parent && ./setup.py versionrunning versionlikely tags: 0.1picking 0.1got version from expanded keyword {'error': None, 'date': '2016-11-16T12:50:37+0100', 'version': '0.1', 'dirty': False, 'full-revisionid': 'e19e5a611f5bb1deba1586579ce4684e95297b6a'}Version: 0.1 full-revisionid: e19e5a611f5bb1deba1586579ce4684e95297b6a dirty: False date: 2016-11-16T12:50:37+0100
Getting version 0+unknown isn't particularly helpful at all here. Especially not since I can get a much more reasonable version like this:
$ rm .gitattributes$mkdir head-no-attrib && git archive --format=tar --worktree-attributes 'HEAD' --prefix=problem-0.1/ | tar -C head-no-attrib -x
$ cd head-no-attrib/problem-0.1 && ./setup.py versionrunning versionkeywords are unexpanded, not usinggot version from VCS {'error': None, 'date': '2016-11-16T12:52:47+0100', 'version': '0.1+1.ge85b611.dirty', 'dirty': True, 'full-revisionid': 'e85b611532c7611077ffd2bf2eeb039d76b2e61a'}Version: 0.1+1.ge85b611.dirty full-revisionid: e85b611532c7611077ffd2bf2eeb039d76b2e61a dirty: True date: 2016-11-16T12:52:47+0100
There are very reasonable use cases for this, and I don't see any value in not trying the parent-dir-prefix method if the result is otherwise going to be 0+unknown anyway. Comments?
The text was updated successfully, but these errors were encountered:
I believe I've discovered a bug in versioneer. Here's an example repos:
Getting version 0+unknown isn't particularly helpful at all here. Especially not since I can get a much more reasonable version like this:
There are very reasonable use cases for this, and I don't see any value in not trying the parent-dir-prefix method if the result is otherwise going to be 0+unknown anyway. Comments?
The text was updated successfully, but these errors were encountered: