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/review/git-codereview: make 'git codereview mail' run 'git push' using --no-follow-tags #41801

Open
cespare opened this issue Oct 5, 2020 · 1 comment
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@cespare
Copy link
Contributor

cespare commented Oct 5, 2020

I have the push.followTags = true option set in my global gitconfig because it's convenient for my typical git workflows on non-Go projects. But it breaks git codereview mail:

$ git mail
remote: Processing changes: refs: 9, done
To https://go.googlesource.com/tools
 ! [remote rejected]   HEAD -> refs/for/master (cannot combine normal pushes and magic pushes)
 ! [remote rejected]   gopls/v0.1.0 -> gopls/v0.1.0 (cannot combine normal pushes and magic pushes)
 ! [remote rejected]   gopls/v0.1.1 -> gopls/v0.1.1 (cannot combine normal pushes and magic pushes)
 ! [remote rejected]   gopls/v0.1.2 -> gopls/v0.1.2 (cannot combine normal pushes and magic pushes)
 ! [remote rejected]   gopls/v0.1.3 -> gopls/v0.1.3 (cannot combine normal pushes and magic pushes)
 ! [remote rejected]   gopls/v0.1.4 -> gopls/v0.1.4 (cannot combine normal pushes and magic pushes)
 ! [remote rejected]   gopls/v0.1.5 -> gopls/v0.1.5 (cannot combine normal pushes and magic pushes)
 ! [remote rejected]   gopls/v0.1.6 -> gopls/v0.1.6 (cannot combine normal pushes and magic pushes)
 ! [remote rejected]   gopls/v0.1.7 -> gopls/v0.1.7 (cannot combine normal pushes and magic pushes)
error: failed to push some refs to 'https://go.googlesource.com/tools'
(running: git push -q origin HEAD:refs/for/master)

Of course, I can set push.followTags = false for all my Go repos on all the machines I use, but it's hard to remember to do that. git-codereview could warn if the option isn't set. But better yet, it could just supply the flag --no-follow-tags to the git push command.

(I didn't check how long the --no-follow-tags flag has existed and whether we need to care about git versions older than that.)

@gopherbot gopherbot added this to the Unreleased milestone Oct 5, 2020
@ALTree ALTree added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Oct 5, 2020
@dmitshur
Copy link
Contributor

CC @rsc, @kevinburke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

4 participants