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

cmd/go: "go mod tidy" does not remove duplicate lines #33603

Closed
kevinburkemeter opened this issue Aug 12, 2019 · 2 comments
Closed

cmd/go: "go mod tidy" does not remove duplicate lines #33603

kevinburkemeter opened this issue Aug 12, 2019 · 2 comments

Comments

@kevinburkemeter
Copy link

@kevinburkemeter kevinburkemeter commented Aug 12, 2019

As a result of a bad rebase, I had exactly duplicate lines in my go.sum file:

github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=

I expected that "go mod tidy" would remove duplicate entries, but each line was left in the resulting file. I'm running Go tip (go version devel +8b058cfbce Sun Aug 11 15:44:08 2019 +0000 darwin/amd64)

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Aug 12, 2019

Failure to collapse duplicate lines in general is #28456.

Thanks for the “bad rebase” detail, though — I was having a hard time figuring out how folks were getting into this state!

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Aug 12, 2019

Duplicate of #28456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.