From e50cd19831229838b5a0df347e14821bc24a2661 Mon Sep 17 00:00:00 2001 From: b5 Date: Fri, 7 Feb 2020 12:16:56 -0500 Subject: [PATCH] fix(remote): fetching logs populates VersionInfo.Foreign --- lib/remote.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/remote.go b/lib/remote.go index 653bc385e..cf7579511 100644 --- a/lib/remote.go +++ b/lib/remote.go @@ -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 }