Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit 10aeca6

Browse files
authored
Merge pull request #585 from jonstacks/master
Don't add unconstrained deps to Manifest on init.
2 parents 3097c00 + d6c4d8a commit 10aeca6

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

cmd/dep/init.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,10 @@ func getProjectData(ctx *dep.Ctx, pkgT pkgtree.PackageTree, cpr string, sm gps.S
407407
}
408408

409409
ondisk[pr] = v
410-
constraints[pr] = getProjectPropertiesFromVersion(v)
410+
pp := getProjectPropertiesFromVersion(v)
411+
if pp.Constraint != nil || pp.Source != "" {
412+
constraints[pr] = pp
413+
}
411414

412415
feedback(v, pr, fb.DepTypeDirect, ctx)
413416
}

cmd/dep/testdata/harness_tests/init/case1/final/Gopkg.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@
22
[[dependencies]]
33
name = "github.com/sdboyer/deptest"
44
version = ">=0.8.0, <1.0.0"
5-
6-
[[dependencies]]
7-
name = "github.com/sdboyer/deptestdos"

cmd/dep/testdata/harness_tests/init/case3/final/Gopkg.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@
22
[[dependencies]]
33
branch = "master"
44
name = "github.com/sdboyer/deptest"
5-
6-
[[dependencies]]
7-
name = "github.com/sdboyer/deptestdos"

0 commit comments

Comments
 (0)