Skip to content

Commit 5979536

Browse files
chengfangTchoupinax
authored andcommitted
fix(git): write back to custom git branch failed by rejected push: tip of your current branch is behind (argoproj-labs#882)
Signed-off-by: Cheng Fang <[email protected]> Signed-off-by: Tchoupinax <[email protected]>
1 parent 4619e83 commit 5979536

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/argocd/git.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func commitChangesGit(app *v1alpha1.Application, wbc *WriteBackConfig, changeLis
246246
if err != nil {
247247
return err
248248
}
249-
err = gitC.Push("origin", pushBranch, false)
249+
err = gitC.Push("origin", pushBranch, pushBranch != checkOutBranch)
250250
if err != nil {
251251
return err
252252
}

0 commit comments

Comments
 (0)