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
cmd/gofmt: gofmt -d
output confuses diffstat
#18932
Comments
CL https://golang.org/cl/36374 mentions this issue. |
I tried to fix this problem in https://golang.org/cl/36374 by simply replacing temporary filename with actual one.
|
That's exactly what I expected the fix to look like! |
we can also use "patch" command if it will be properly fixed. we can use gofmt -w in most cases, but I think it's useful to keep in mind that output of |
CL https://golang.org/cl/36644 mentions this issue. |
Port of gofmt change at golang/go#18932 with golang/go#18999 fix Change-Id: I8999d6a3e04946086dd159201dbc4b09338bf1c0 Reviewed-on: https://go-review.googlesource.com/36644 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
Given a non-gofmt-formatted
.go
file (or files), I piped the output ofgofmt -d
todiffstat
. Rather than seeing the name of the file in the diffstat output, I see a garbage temporary filename.For the below examples, this the input:
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: