diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-12-07 05:10:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-06 21:10:35 +0000 |
commit | 513da407f406b161aca078c8e1158f3394e71ca1 (patch) | |
tree | dcec1cb252744c3c85cc0273e025cb7f9079a2ce /modules | |
parent | 5a75160c92190eb038d9b0fc71846310e76a5481 (diff) | |
download | gitea-513da407f406b161aca078c8e1158f3394e71ca1.tar.gz gitea-513da407f406b161aca078c8e1158f3394e71ca1.zip |
Support "merge upstream branch" (Sync fork) (#32741)
Add basic "sync fork" support (GitHub-like)
<details>
![image](https://github.com/user-attachments/assets/e71473f4-4518-48c7-b9e2-fedfcd564fc3)
</details>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/git/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/repo.go b/modules/git/repo.go index 1c223018ad..fc6e6e7acc 100644 --- a/modules/git/repo.go +++ b/modules/git/repo.go @@ -223,7 +223,7 @@ func Push(ctx context.Context, repoPath string, opts PushOptions) error { if err != nil { if strings.Contains(stderr, "non-fast-forward") { return &ErrPushOutOfDate{StdOut: stdout, StdErr: stderr, Err: err} - } else if strings.Contains(stderr, "! [remote rejected]") { + } else if strings.Contains(stderr, "! [remote rejected]") || strings.Contains(stderr, "! [rejected]") { err := &ErrPushRejected{StdOut: stdout, StdErr: stderr, Err: err} err.GenerateMessage() return err |