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: provide a way to configure gerrit URL without codereview.cfg file in the repository #15073

Closed
cmarcelo opened this issue Apr 2, 2016 · 4 comments

Comments

@cmarcelo
Copy link
Contributor

cmarcelo commented Apr 2, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?

go version go1.5.3 linux/amd64

  1. What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/cmdeoliv/go"
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT=""
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.

Trying to use git-codereview with a Gerrit repository that doesn't have codereview.cfg configuration file. It is not always possible to add the file to upstream repository, but git-codereview features that depend on Gerrit could still be used.

  1. What did you expect to see?

git-codereview either provide a way for me to configure the gerrit URL that doesn't depend on the codereview.cfg file being in the repository.

  1. What did you see instead?

git-codereview doesn't identify my repository as Gerrit, then disable features that depend on Gerrit.

@gopherbot
Copy link

CL https://golang.org/cl/19684 mentions this issue.

@josharian
Copy link
Contributor

Does CL 24001 help with this?

@gopherbot
Copy link

CL https://golang.org/cl/24001 mentions this issue.

gopherbot pushed a commit to golang/review that referenced this issue Jun 14, 2016
Loading codereview.cfg from origin/master
effictively means that users have to ask permission
to use git-codereview.
With this change, users can opt to add the file,
.gitignore it, and forget about it.

Looking in origin/master also makes it hard
to try out git-codereview on a project
without having to commit to it.

Instead of requiring codereview.cfg be checked in
anywhere, just look on the filesystem for it.
I can't figure out why I ever thought
doing otherwise was a good idea.

There are some other related fixes floating around,
which might also be good to put in,
but this is seems like a good stop-gap,
since it is a minimal change;
codereview.cfg continues to work for anyone
currently using it.

Related: golang/go#15616
Related: golang/go#15073

Change-Id: I1e377819f8eb8c8fecf9f022459551a3e8b93d48
Reviewed-on: https://go-review.googlesource.com/24001
Reviewed-by: Andrew Gerrand <adg@golang.org>
@rsc
Copy link
Contributor

rsc commented Oct 13, 2016

Closing; I think CL 24001 is a good fix.

@rsc rsc closed this as completed Oct 13, 2016
@golang golang locked and limited conversation to collaborators Oct 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants