fetch: fix recursive dependency fetching with -branch The branch indication was being carried on to the recursive dependencies because the global branch variable was getting shadowed before being cleared. Fixes #25
diff --git a/fetch.go b/fetch.go index 13d90fb..5797bef 100644 --- a/fetch.go +++ b/fetch.go
@@ -105,7 +105,7 @@ return err } - branch, err := wc.Branch() + b, err := wc.Branch() if err != nil { return err } @@ -114,7 +114,7 @@ Importpath: path, Repository: repo.URL(), Revision: rev, - Branch: branch, + Branch: b, Path: extra, NoTests: !tests, }