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
The param comment for tag() in base.py mentions 0.1.5 and tags/0.1.5 as valid inputs, however the call to TagReference calls the inherited constructor (Reference in reference.py) with the default check_path=True, which returns a ValueError, if the tag/path given doesnt start with self._common_path_default + '/'.
Either the param comment needs to be adjusted or the tag parameter cleaned up so that it only returns the tag value to Reference.__init__.
The text was updated successfully, but these errors were encountered:
Thanks for letting me know - I see that the current state is not correct.
Since tag() sits on the Repo type I would love to actually behave as advertised as it reflects typical usage. Unfortunately the TagReference type might not work correctly if its name is not the complete path to the reference, so remving this check probably won't do.
Instead the name should be resolved to a path which might at least need a call to the git program. Alternatively one could probably naively fix it by traversing all tags and finding a matching tag name. All this though seems quite time consuming and I wonder if there is a more elegant way.
If you consider a PR, for now fixing the docs to reflect the actual behaviour would already help to reduce surprises, and we can keep an issue here to propose enhancing this to support tag names as well.
I'm quite new to python though, so be harsh and truthful with your remarks.
However I'm already stumped regarding the positioning of private methods. They seem to be all over the place. I can't make out an order. I'll just place the one I intend to make right below where I'm using it and you can then point me to the right place :P
The param comment for
tag()
inbase.py
mentions0.1.5
andtags/0.1.5
as valid inputs, however the call toTagReference
calls the inherited constructor (Reference
in reference.py) with the defaultcheck_path=True
, which returns aValueError
, if the tag/path given doesnt start withself._common_path_default + '/'
.Either the param comment needs to be adjusted or the tag parameter cleaned up so that it only returns the tag value to
Reference.__init__
.The text was updated successfully, but these errors were encountered: