Backport #24133 by @jtran
For 2-dot direct compare, we should use the base commit in the title and
templates, as is used elsewhere, not the common ancestor which is used
for 3-dot compare. I believe that this change should have been included
in #22949.
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
ctx.ServerError("GetCompareInfo", err)
return nil
}
- ctx.Data["BeforeCommitID"] = ci.CompareInfo.MergeBase
+ if ci.DirectComparison {
+ ctx.Data["BeforeCommitID"] = ci.CompareInfo.BaseCommitID
+ } else {
+ ctx.Data["BeforeCommitID"] = ci.CompareInfo.MergeBase
+ }
return ci
}