FAQ
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
misc/git/pre-commit:9: # it has execute permissions.
On 2012/11/14 10:34:09, minux wrote:
do you want to document that it doesn't handle spaces in
filenames?
Documented.
also, it can only handle the case where files staged to
be committed (in the index) is the same as the corresponding
file in the working copy.
I'm ok with that.

https://codereview.appspot.com/6843044/diff/1005/misc/git/pre-commit#newcode14
misc/git/pre-commit:14: unformatted=$(gofmt -l $gofiles)
On 2012/11/14 10:34:09, minux wrote:
do you want to ignore messages on stderr?
gofmt will display some confusing messages when some
file is not found (due to spaces in the filename)
I'd prefer not to hide the messages. At least then the user has a hope of
figuring out what went wrong.

https://codereview.appspot.com/6843044/diff/1005/misc/git/pre-commit#newcode19
misc/git/pre-commit:19: echo >&2 "Go files must be formatted with
gofmt. Please
run:\n"
On 2012/11/14 10:34:09, minux wrote:
echo with \n?
Done.

https://codereview.appspot.com/6843044/diff/1005/misc/git/pre-commit#newcode23
misc/git/pre-commit:23: printf >&2 " %s/%s" "${PWD}" "${fn}"
On 2012/11/14 10:34:09, minux wrote:
why {}? "$PWD" "$fn" is ok.
Done.
https://codereview.appspot.com/6843044/

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 20 of 30 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 13, '12 at 1:38p
activeNov 15, '12 at 6:59p
posts30
users6
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase