Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Commit

Permalink
No need to build.Import the dep
Browse files Browse the repository at this point in the history
We've already figured out the root of the dep, so just use that.
  • Loading branch information
Edward Muller committed May 20, 2016
1 parent 0bd5e5b commit 56b9657
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
17 changes: 11 additions & 6 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
#v69 (2016/06/16)
#v70 (2016/05/20)

* Fix the May changelog dates
* No need to call build.Import, we already have the root of the dependency. Fixes an additional comment on #365

#v69 (2016/05/16)

* Make sure `devel-<short sha>` enabled `vendor/` unless there is a classic Godep _workspace already.

#v68 (2016/06/16)
#v68 (2016/05/16)

* `devel-<short sha>` is always considered newer than any released go version

#v67 (2016/06/13)
#v67 (2016/05/13)

* Attempt to handle missing deps a little better.

#v66 (2016/06/10)
#v66 (2016/05/10)

* Use `git remote show origin` to find the default branch when restoring a git based package repository that is in detached head state

#v65 (2016/06/09)
#v65 (2016/05/09)

* Rewrite update so that it considers new transitive dependencies, both in the same repo and outside of it.

#v64 (2016/06/09)
#v64 (2016/05/09)

* godep update golang.org/x/tools/go/vcs

Expand Down
8 changes: 1 addition & 7 deletions restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,7 @@ func restore(dep Dependency) error {
}

debugln("Restoring:", dep.ImportPath, dep.Rev)
pkg, err := build.Import(dep.ImportPath, ".", build.FindOnly)
if err != nil {
// This should never happen
debugln("Error finding package "+dep.ImportPath+" on restore:", err)
return err
}
err = dep.vcs.RevSync(pkg.Dir, dep.Rev)
err := dep.vcs.RevSync(dep.root, dep.Rev)
if err == nil {
restored[dep.root] = dep.Rev
}
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
)

const version = 69
const version = 70

var cmdVersion = &Command{
Name: "version",
Expand Down

0 comments on commit 56b9657

Please sign in to comment.