Merge branch 'stable-2.12'
* stable-2.12: Fix sending of inline comments on commit message for initial change AbstractQueryChangesTest: Add test for query by draft status Fix schema 115: Create a new MetaDataUpdate instance for each update Add the --strict-labels option to SSH review command Allow to add custom core plugins in release build Maven: Split Maven repository settings out to a separate def file Change-Id: I6025858f08214056c288823fe1ce79685800182a
This commit is contained in:
@@ -26,6 +26,7 @@ import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectReader;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
import org.eclipse.jgit.revwalk.RevTree;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.treewalk.TreeWalk;
|
||||
@@ -56,7 +57,11 @@ public class PatchFile {
|
||||
if (patchList.isAgainstParent()) {
|
||||
a = Text.EMPTY;
|
||||
} else {
|
||||
a = Text.forCommit(reader, patchList.getOldId());
|
||||
// For the initial commit, we have an empty tree on Side A
|
||||
RevObject object = rw.parseAny(patchList.getOldId());
|
||||
a = object instanceof RevCommit
|
||||
? Text.forCommit(reader, object)
|
||||
: Text.EMPTY;
|
||||
}
|
||||
b = Text.forCommit(reader, bCommit);
|
||||
|
||||
|
Reference in New Issue
Block a user