diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-02-05 19:54:49 +0800 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-02-05 06:54:49 -0500 |
commit | bf4badad1d68c18d7ffb92c69e09e4e8aa252935 (patch) | |
tree | 9e8c3a41eba604738e632d921a2de97334e35e03 /routers | |
parent | 680a57ce921f6d8c8752fa27aad6c95865fe8127 (diff) | |
download | gitea-bf4badad1d68c18d7ffb92c69e09e4e8aa252935.tar.gz gitea-bf4badad1d68c18d7ffb92c69e09e4e8aa252935.zip |
Pull request conflict files detection (#5951)
* add conflict detection
* test pull request conflict files
* fix detection files number
* fix comments
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/pull.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index c060aeb4b5..a65b68a96e 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -345,6 +345,11 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.PullReq ctx.Data["WorkInProgressPrefix"] = pull.GetWorkInProgressPrefix() } + if pull.IsFilesConflicted() { + ctx.Data["IsPullFilesConflicted"] = true + ctx.Data["ConflictedFiles"] = pull.ConflictedFiles + } + ctx.Data["NumCommits"] = prInfo.Commits.Len() ctx.Data["NumFiles"] = prInfo.NumFiles return prInfo |