Add --force flag in git fetch command

Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
v0.8
Vlad A. Ionescu 2020-03-27 17:37:01 -07:00 committed by Vlad A. Ionescu
parent c60a1eb215
commit 4ce2075095
1 changed files with 1 additions and 1 deletions

View File

@ -272,7 +272,7 @@ func (gs *gitSourceHandler) Snapshot(ctx context.Context) (out cache.ImmutableRe
}
args = append(args, "origin")
if !isCommitSHA(ref) {
args = append(args, ref+":tags/"+ref)
args = append(args, "--force", ref+":tags/"+ref)
// local refs are needed so they would be advertised on next fetches
// TODO: is there a better way to do this?
}