Skip to content

Commit

Permalink
fix(remote): fetching logs populates VersionInfo.Foreign
Browse files Browse the repository at this point in the history
  • Loading branch information
b5 committed Feb 7, 2020
1 parent 1d30975 commit e50cd19
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ func (r *RemoteMethods) Fetch(p *FetchParams, res *[]dsref.VersionInfo) error {
if len(versions) == 0 {
return repo.ErrNoHistory
}

for i, v := range versions {
local, hasErr := r.inst.Repo().Store().Has(ctx, v.Path)
if hasErr != nil {
continue
}
versions[i].Foreign = !local
}

*res = versions
return nil
}
Expand Down

0 comments on commit e50cd19

Please sign in to comment.