Skip to content

Commit 24faa46

Browse files
authored
Force Push (#2837)
For the time being, use force when pushing to remote(s). Eventually we'll implement conflict resolution but until deletion and conflict resolution are supported, Force is a good way to avoid hard to recover scenarios
1 parent e0bd1ed commit 24faa46

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

porch/repository/pkg/git/draft.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ func (d *gitPackageDraft) Close(ctx context.Context) (repository.PackageRevision
115115
}
116116

117117
if err := d.parent.repo.Push(&git.PushOptions{
118-
RemoteName: "origin",
119-
RefSpecs: []config.RefSpec{refSpec},
120-
Auth: auth,
121-
RequireRemoteRefs: []config.RefSpec{},
118+
RemoteName: "origin",
119+
RefSpecs: []config.RefSpec{refSpec},
120+
Auth: auth,
121+
Force: true, // TODO: implement conflict recovery.
122122
}); err != nil {
123123
return nil, fmt.Errorf("failed to push to git: %w", err)
124124
}

0 commit comments

Comments
 (0)