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: -h flag requires a git repository #34320

Closed
mvdan opened this issue Sep 16, 2019 · 3 comments
Closed

x/review/git-codereview: -h flag requires a git repository #34320

mvdan opened this issue Sep 16, 2019 · 3 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@mvdan
Copy link
Member

mvdan commented Sep 16, 2019

git-codereview help works outside of a git repository, but not the -h flag.

$ go version go/bin/git-codereview
go/bin/git-codereview: devel +782228a73f Mon Sep 16 14:12:02 2019 +0000
$ go version -m go/bin/git-codereview
go/bin/git-codereview: devel +782228a73f Mon Sep 16 14:12:02 2019 +0000
        path    golang.org/x/review/git-codereview
        mod     golang.org/x/review     v0.0.0-20190830135701-11e366f73b12      h1:AQCtuL00NnB4z8ZXSBVXaFs2VEjo2cAA03eR7DSEP84=
$ ./go/bin/git-codereview -h
git rev-parse --show-toplevel
fatal: not a git repository (or any of the parent directories): .git

./go/bin/git-codereview: exit status 128
@mvdan mvdan added Suggested Issues that may be good for new contributors looking for work to do. help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Sep 16, 2019
@gopherbot gopherbot added this to the Unreleased milestone Sep 16, 2019
@AndersonQ
Copy link
Contributor

I can investigate :)

@AndersonQ
Copy link
Contributor

Found it! the haveGerrit() needs git ant it's the one thwoing the error. The check for help happens before haveGerrit(), but not fot the -h flag.
I'll submit a PR latter today

@gopherbot
Copy link

Change https://golang.org/cl/195897 mentions this issue: x/review/git-codereview: -h working outside git repository

@golang golang locked and limited conversation to collaborators Sep 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

3 participants