diff options
Diffstat (limited to 'services/wiki/wiki.go')
-rw-r--r-- | services/wiki/wiki.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/wiki/wiki.go b/services/wiki/wiki.go index 2ace1d7a08..3616823c5d 100644 --- a/services/wiki/wiki.go +++ b/services/wiki/wiki.go @@ -212,6 +212,9 @@ func updateWikiPage(doer *models.User, repo *models.Repository, oldWikiName, new ), }); err != nil { log.Error("%v", err) + if git.IsErrPushOutOfDate(err) || git.IsErrPushRejected(err) { + return err + } return fmt.Errorf("Push: %v", err) } @@ -316,6 +319,9 @@ func DeleteWikiPage(doer *models.User, repo *models.Repository, wikiName string) Branch: fmt.Sprintf("%s:%s%s", commitHash.String(), git.BranchPrefix, "master"), Env: models.PushingEnvironment(doer, repo), }); err != nil { + if git.IsErrPushOutOfDate(err) || git.IsErrPushRejected(err) { + return err + } return fmt.Errorf("Push: %v", err) } |