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: add an -m option #24912
Comments
Change https://golang.org/cl/107625 mentions this issue: |
Naive attempt at https://go-review.googlesource.com/c/review/+/107625 |
Since commit messages for the Go projects rarely fit one line, I found an editor as better tool. I am not sure how many people would use that. |
We (and many others) use the codereview tool to submit changesets to projects other than the Go project. In these other projects, one-liners are fairly frequent - example here. The main usecase for this is that we're automating our pipeline of producing and mailing out autogenerated code; it's a pain automating the The secondary usecase is that trivial commits made by humans would be less hassle if we could skip the editor step (for example, the commit linked above; there are many more like that). |
You can always use the underlying git command if you are automating git commits.
I have never used one-line commits personally, although I can imagine it can be useful in some cases. In any case, a tool should not limit one's workflow, whatever that may be. We might as well maintain parity with git. |
@agnivade Pardon my ignorance - at which step is the change ID generated and inserted into the commit message? That's the part of my impl that's naive (I didn't make sure all the logic around changeID is in place properly). |
@jadekler
change-id happens in commit-msg hook: |
/cc @josharian according to owners. Josh - can you check if we should add the @jadekler - Have you had a chance to look into the |
git-codereview is intended to be generally useful, not just for the Go project (where, with @ysmolsky, I would usually expect longer commit messages). I am generally reluctant to add new flags, but this seems reasonable enough to me. I'll leave some comments on the outstanding CL. |
Change https://golang.org/cl/130155 mentions this issue: |
ping @jadekler. Could please fix the test in your CL? |
[redacted, wrong issue] |
@jadekler Are you sure you're on the right issue here? |
Oh, wow. Whoops. Thanks @ianlancetaylor! |
@ysmolsky Done! |
I'd love to be able to
git codereview change -m "some message"
, the same way that I cangit commit -m "some message"
.The text was updated successfully, but these errors were encountered: