File tree 1 file changed +3
-9
lines changed
1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -221,19 +221,13 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
221
221
} else {
222
222
infos = strings .SplitN (infoPath , "..." , 2 )
223
223
if len (infos ) != 2 {
224
- infos = []string {baseRepo .DefaultBranch , infoPath }
225
- if strings .Contains (infoPath , ".." ) {
226
- infos = strings .SplitN (infoPath , ".." , 2 )
224
+ if infos = strings .SplitN (infoPath , ".." , 2 ); len (infos ) == 2 {
227
225
ci .DirectComparison = true
228
226
ctx .Data ["PageIsComparePull" ] = false
227
+ } else {
228
+ infos = []string {baseRepo .DefaultBranch , infoPath }
229
229
}
230
230
}
231
-
232
- if len (infos ) != 2 {
233
- log .Trace ("ParseCompareInfo[%d]: not enough compared branches information %s" , baseRepo .ID , infos )
234
- ctx .NotFound ("CompareAndPullRequest" , nil )
235
- return nil
236
- }
237
231
}
238
232
239
233
ctx .Data ["BaseName" ] = baseRepo .OwnerName
You can’t perform that action at this time.
0 commit comments