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
kevinburke1 opened this issue Aug 12, 2019 · 2 comments
Closed

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

kevinburke1 opened this issue Aug 12, 2019 · 2 comments

Comments

@kevinburke1
Copy link

kevinburke1 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
Copy link
Contributor

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
Copy link
Contributor

bcmills commented Aug 12, 2019

Duplicate of #28456

@bcmills bcmills marked this as a duplicate of #28456 Aug 12, 2019
@bcmills bcmills closed this as completed Aug 12, 2019
@golang golang locked and limited conversation to collaborators Aug 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants