Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7792)

Issue 6843044: code review 6843044: misc/git: add gofmt git pre-commit hook (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by adg
Modified:
11 years, 5 months ago
Reviewers:
CC:
golang-dev, bradfitz, ftrvxmtrx, fss, r, minux1
Visibility:
Public.

Description

misc/git: add gofmt git pre-commit hook

Patch Set 1 #

Total comments: 1

Patch Set 2 : diff -r f5c69f87ef34 https://code.google.com/p/go #

Total comments: 2

Patch Set 3 : diff -r f5c69f87ef34 https://code.google.com/p/go #

Total comments: 10

Patch Set 4 : diff -r cbb5a28097e9 https://code.google.com/p/go #

Total comments: 2

Patch Set 5 : diff -r cbb5a28097e9 https://code.google.com/p/go #

Total comments: 8

Patch Set 6 : diff -r cbb5a28097e9 https://code.google.com/p/go #

Total comments: 2

Patch Set 7 : diff -r cbb5a28097e9 https://code.google.com/p/go #

Patch Set 8 : diff -r 99e41aa77582 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -0 lines) Patch
A misc/git/pre-commit View 1 2 3 4 5 6 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 30
adg
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
11 years, 5 months ago (2012-11-13 13:38:39 UTC) #1
bradfitz
LGTM On Tue, Nov 13, 2012 at 5:38 AM, <adg@golang.org> wrote: > Reviewers: golang-dev_googlegroups.com, > ...
11 years, 5 months ago (2012-11-13 14:58:37 UTC) #2
adg
I'm going to point to this from a blog post, so picky comments about my ...
11 years, 5 months ago (2012-11-13 15:11:50 UTC) #3
ftrvxmtrx
echo -n is not portable, printf is better. Also, I think "/usr/bin/env bash" could be ...
11 years, 5 months ago (2012-11-13 15:21:09 UTC) #4
adg
Hello golang-dev@googlegroups.com, bradfitz@golang.org, ftrvxmtrx@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 5 months ago (2012-11-13 15:29:28 UTC) #5
fss
http://codereview.appspot.com/6843044/diff/1/misc/git/pre-commit File misc/git/pre-commit (right): http://codereview.appspot.com/6843044/diff/1/misc/git/pre-commit#newcode21 misc/git/pre-commit:21: dir="$(pwd)" You can drop this variable and use the ...
11 years, 5 months ago (2012-11-13 15:32:14 UTC) #6
ftrvxmtrx
http://codereview.appspot.com/6843044/diff/2002/misc/git/pre-commit File misc/git/pre-commit (right): http://codereview.appspot.com/6843044/diff/2002/misc/git/pre-commit#newcode12 misc/git/pre-commit:12: [ "$gofiles" == "" ] && exit 0 Either ...
11 years, 5 months ago (2012-11-13 15:39:10 UTC) #7
adg
Hello golang-dev@googlegroups.com, bradfitz@golang.org, ftrvxmtrx@gmail.com, franciscossouza@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 5 months ago (2012-11-13 15:45:23 UTC) #8
ftrvxmtrx
http://codereview.appspot.com/6843044/diff/2004/misc/git/pre-commit File misc/git/pre-commit (right): http://codereview.appspot.com/6843044/diff/2004/misc/git/pre-commit#newcode21 misc/git/pre-commit:21: for fn in $unformatted; do echo "$unformatted" | while ...
11 years, 5 months ago (2012-11-13 15:55:02 UTC) #9
r
https://codereview.appspot.com/6843044/diff/2004/misc/git/pre-commit File misc/git/pre-commit (right): https://codereview.appspot.com/6843044/diff/2004/misc/git/pre-commit#newcode8 misc/git/pre-commit:8: # To use, store as .git/hooks/pre-commit inside you repository ...
11 years, 5 months ago (2012-11-13 17:14:48 UTC) #10
minux1
I propose this version to solve the space in filename problem: if [ "x$1" == ...
11 years, 5 months ago (2012-11-13 17:35:52 UTC) #11
fss
On Tue, Nov 13, 2012 at 3:35 PM, minux <minux.ma@gmail.com> wrote: > I propose this ...
11 years, 5 months ago (2012-11-13 17:42:22 UTC) #12
ftrvxmtrx
On 2012/11/13 17:42:22, fss wrote: > On Tue, Nov 13, 2012 at 3:35 PM, minux ...
11 years, 5 months ago (2012-11-13 17:48:12 UTC) #13
minux1
On Wed, Nov 14, 2012 at 1:42 AM, Francisco Souza <franciscossouza@gmail.com>wrote: > On Tue, Nov ...
11 years, 5 months ago (2012-11-13 18:20:45 UTC) #14
adg
I'd prefer not totally rewrite this. I like that it: a) provides a command line ...
11 years, 5 months ago (2012-11-14 09:51:20 UTC) #15
adg
Hello golang-dev@googlegroups.com, bradfitz@golang.org, ftrvxmtrx@gmail.com, franciscossouza@gmail.com, r@golang.org, minux.ma@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 5 months ago (2012-11-14 09:51:33 UTC) #16
ftrvxmtrx
http://codereview.appspot.com/6843044/diff/11001/misc/git/pre-commit File misc/git/pre-commit (right): http://codereview.appspot.com/6843044/diff/11001/misc/git/pre-commit#newcode20 misc/git/pre-commit:20: printf >&2 " gofmt -w" >&2 two times >&2?
11 years, 5 months ago (2012-11-14 09:56:49 UTC) #17
adg
https://codereview.appspot.com/6843044/diff/11001/misc/git/pre-commit File misc/git/pre-commit (right): https://codereview.appspot.com/6843044/diff/11001/misc/git/pre-commit#newcode20 misc/git/pre-commit:20: printf >&2 " gofmt -w" >&2 On 2012/11/14 09:56:50, ...
11 years, 5 months ago (2012-11-14 09:58:38 UTC) #18
ftrvxmtrx
LGTM On 2012/11/14 09:58:38, adg wrote: > https://codereview.appspot.com/6843044/diff/11001/misc/git/pre-commit > File misc/git/pre-commit (right): > > https://codereview.appspot.com/6843044/diff/11001/misc/git/pre-commit#newcode20 ...
11 years, 5 months ago (2012-11-14 10:02:19 UTC) #19
minux1
https://codereview.appspot.com/6843044/diff/1005/misc/git/pre-commit File misc/git/pre-commit (right): https://codereview.appspot.com/6843044/diff/1005/misc/git/pre-commit#newcode9 misc/git/pre-commit:9: # it has execute permissions. do you want to ...
11 years, 5 months ago (2012-11-14 10:34:09 UTC) #20
adg
https://codereview.appspot.com/6843044/diff/1005/misc/git/pre-commit File misc/git/pre-commit (right): https://codereview.appspot.com/6843044/diff/1005/misc/git/pre-commit#newcode9 misc/git/pre-commit:9: # it has execute permissions. On 2012/11/14 10:34:09, minux ...
11 years, 5 months ago (2012-11-14 10:39:53 UTC) #21
fss
LGTM On 2012/11/14 10:39:53, adg wrote: > https://codereview.appspot.com/6843044/diff/1005/misc/git/pre-commit > File misc/git/pre-commit (right): > > https://codereview.appspot.com/6843044/diff/1005/misc/git/pre-commit#newcode9 ...
11 years, 5 months ago (2012-11-14 10:52:28 UTC) #22
minux1
LGTM.
11 years, 5 months ago (2012-11-14 10:54:16 UTC) #23
r
Tell me more about echo -n not being portable for this purpose. I'd like to ...
11 years, 5 months ago (2012-11-14 14:35:43 UTC) #24
fss
On Wed, Nov 14, 2012 at 12:35 PM, Rob Pike <r@golang.org> wrote: > Tell me ...
11 years, 5 months ago (2012-11-14 14:47:38 UTC) #25
r
I am surprised to learn (again) that 'sh' today means the PWB shell and its ...
11 years, 5 months ago (2012-11-14 15:04:32 UTC) #26
r
http://codereview.appspot.com/6843044/diff/12002/misc/git/pre-commit File misc/git/pre-commit (right): http://codereview.appspot.com/6843044/diff/12002/misc/git/pre-commit#newcode27 misc/git/pre-commit:27: echo >&2 by the time you've put the backslash ...
11 years, 5 months ago (2012-11-14 15:08:49 UTC) #27
adg
https://codereview.appspot.com/6843044/diff/12002/misc/git/pre-commit File misc/git/pre-commit (right): https://codereview.appspot.com/6843044/diff/12002/misc/git/pre-commit#newcode27 misc/git/pre-commit:27: echo >&2 On 2012/11/14 15:08:50, r wrote: > by ...
11 years, 5 months ago (2012-11-15 16:48:15 UTC) #28
r
LGTM
11 years, 5 months ago (2012-11-15 18:24:30 UTC) #29
adg
11 years, 5 months ago (2012-11-15 18:58:57 UTC) #30
*** Submitted as http://code.google.com/p/go/source/detail?r=68613f8e57b8 ***

misc/git: add gofmt git pre-commit hook

R=golang-dev, bradfitz, ftrvxmtrx, franciscossouza, r, minux.ma
CC=golang-dev
http://codereview.appspot.com/6843044
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b