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

x/tools/go/vcs: vcs.Cmd.TagSync will fail if the repository's default branch is not 'master' [Go 1.9] #22556

vipally opened this Issue Nov 3, 2017 · 1 comment


None yet
3 participants
Copy link

vipally commented Nov 3, 2017

  1. I use this command to clone the default branch of repository:
    git clone --depth 1 test_downloads\\vipally\binary

  2. And this repository's default branch is not 'master' but 'develop'
    git status
    On branch develop
    Your branch is up-to-date with 'origin/develop'.
    nothing to commit, working tree clean

  3. After that I wanna use this code to keep working directory up-to-date with remote
    vcs.Cmd.TagSync(path, "")

    But unfortunately it will fail with report:
    error: pathspec 'master' did not match any file(s) known to git.

    Because it use such command to sync remote:
    git checkout master

    But current woring branch is not 'master' but 'develop'.

    This command is proper usage:
    git checkout

    You can see the test case here(TestDownloadAndSyncRepo):

    and fix code here:

    If confirm it as a bug, I will create a pullrequest to fix this issue.

@gopherbot gopherbot added this to the Unreleased milestone Nov 3, 2017


This comment has been minimized.

Copy link

empijei commented Nov 6, 2017

I think this is cause by this that uses default command if present and a tag was not specified.

The default command uses master without invoking TagLookupCmd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.