-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from rogpeppe/017-fix-undo-bug
gohack undo: restore old replace comment correctly
- Loading branch information
Showing
3 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
cd repo | ||
gohack undo | ||
stdout 'dropped gopkg.in/errgo.v2' | ||
|
||
grep '^\tgopkg.in/errgo.v2 => github.com/rogpeppe/test2/arble v0.0.0-20181008213029-f6022c873160$' go.mod | ||
|
||
-- repo/main.go -- | ||
package main | ||
import _ "gopkg.in/errgo.v2" | ||
|
||
-- repo/go.mod -- | ||
module example.com/repo | ||
|
||
require ( | ||
gopkg.in/errgo.v2 v2.1.0 | ||
rsc.io/sampler v1.3.0 | ||
) | ||
|
||
replace ( | ||
rsc.io/sampler v1.3.0 => rsc.io/sampler v1.2.1 | ||
gopkg.in/errgo.v2 => ../foo // was gopkg.in/errgo.v2 => github.com/rogpeppe/test2/arble v0.0.0-20181008213029-f6022c873160 | ||
) | ||
|
||
-- foo/foo.go -- | ||
package foo | ||
|
||
-- foo/go.mod -- | ||
module example.com/foo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
cd repo | ||
gohack undo | ||
stdout 'dropped gopkg.in/errgo.v2' | ||
|
||
grep '^replace gopkg.in/errgo.v2 => github.com/rogpeppe/test2/arble v0.0.0-20181008213029-f6022c873160$' go.mod | ||
|
||
-- repo/main.go -- | ||
package main | ||
import _ "gopkg.in/errgo.v2" | ||
|
||
-- repo/go.mod -- | ||
module example.com/repo | ||
|
||
require gopkg.in/errgo.v2 v2.1.0 | ||
|
||
replace gopkg.in/errgo.v2 => ../foo // was gopkg.in/errgo.v2 => github.com/rogpeppe/test2/arble v0.0.0-20181008213029-f6022c873160 | ||
|
||
-- foo/foo.go -- | ||
package foo | ||
|
||
-- foo/go.mod -- | ||
module example.com/foo |