fetch
fetch copied to clipboard
Fetching Using --branch Gives Tag Error
Using fetch_linux_amd64 to fetch a copy of my repo by branch name using OAuth token. So the command I am using is the below:
./fetch_linux_amd64 --repo="https://github.com/AAA/REPO_A" --branch="master" ./LOCAL_REPO_A
The error that it's returning is: ERROR: Error occurred while computing latest tag that satisfies version contraint expression: -1 - Malformed version: testing_fix-multi-netif-ctrl-tab_07_06
"testing_fix-multi-netif-ctrl-tab_07_06" in the error is a pre-release tag that I had created on the repo. I am confused as to why it's even computing/checking tag names because I want to fetch the repo by branch name and had specified using --branch option. When I tried other branch names besides master I got the same error.
Then I tried the original command and substituted --branch with --tag, see below: ./fetch_linux_amd64 --repo="https://github.com/AAA/REPO_A" --tag="master" ./LOCAL_REPO_A
It seems that the new command was able to fetch the master branch of my repo. I am confused as to why the --tag would work but --branch didn't work. This seems like a bug.
That is odd behavior indeed, and it sounds like this is a bug. As you suggest, if you specify a branch, there should be no reason for fetch
to compute the latest tag. I'll mark this as a bug, but don't have an immediate fix timeframe just yet. PRs welcome!
I just ran into this issue today, so it appears to still exist. I specified --branch master
and received:
ERROR: Error occurred while computing latest tag that satisfies version contraint expression: -1 - Malformed version: ubuntu18_04_pretesting
This was with release v0.3.0 on linux_amd64. ubuntu18_04_pretesting
is the name of a branch in my repository, but doesn't contain the latest commit.