Merge "Fix diff base gitweb link" into stable-2.14

This commit is contained in:
Edwin Kempin 2017-10-03 10:32:51 +00:00 committed by Gerrit Code Review
commit 15d5f1e920

View File

@ -202,12 +202,7 @@ public class GetDiff implements RestReadView<FileResource> {
ProjectState state = projectCache.get(resource.getRevision().getChange().getProject());
DiffInfo result = new DiffInfo();
// TODO referring to the parent commit by refs/changes/12/60012/1^1
// will likely not work for inline edits
String revA =
basePatchSet != null
? basePatchSet.getRefName()
: resource.getRevision().getPatchSet().getRefName() + "^1";
String revA = basePatchSet != null ? basePatchSet.getRefName() : content.commitIdA;
String revB =
resource.getRevision().getEdit().isPresent()
? resource.getRevision().getEdit().get().getRefName()