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
In the same line as #214 , I was playing around with shallow and noticed that importing shallowly git repositories with a version specified by a hash causes errors when exporting. Again, I am using vcstool 2.15, so there is a chance this was fixed in the later versions.
It seems that git rev-list --remotes=origin --tags does not return anything in this case as .git/refs is empty. I believe that a simple git rev-parse HEAD and git tag --points-at HEAD is enough information to deduce exact-with-tags, but I might be missing a lot of the details here as you seem to double check that the tag exists on the remote as well.
Note that there is an easy workaround:
vcs custom --git --args fetch --deepen 1
Will fetch a bit of history (including all tags) and that'll fix the command. There might be an even easier way, but that's what I've found so far.
Any advice on how to fix that in vcstool?
The text was updated successfully, but these errors were encountered:
It takes the named refs of the current remote plus the tags, and lists these commits and their parents. The tags might be from another remote though, so it does not really find the remote which has the current HEAD. The command returns nothing in that case as all those refs are empty.
Can anyone help with what the referenced code should do? @dirk-thomas?
In the same line as #214 , I was playing around with shallow and noticed that importing shallowly git repositories with a version specified by a hash causes errors when exporting. Again, I am using vcstool 2.15, so there is a chance this was fixed in the later versions.
Using this YAML:
And running
Followed by any of the following:
Results in the following error:
I have narrowed down the cause to the following line:
vcstool/vcstool/clients/git.py
Line 160 in d120933
It seems that
git rev-list --remotes=origin --tags
does not return anything in this case as.git/refs
is empty. I believe that a simplegit rev-parse HEAD
andgit tag --points-at HEAD
is enough information to deduce exact-with-tags, but I might be missing a lot of the details here as you seem to double check that the tag exists on the remote as well.Note that there is an easy workaround:
Will fetch a bit of history (including all tags) and that'll fix the command. There might be an even easier way, but that's what I've found so far.
Any advice on how to fix that in vcstool?
The text was updated successfully, but these errors were encountered: