Parse body when creating CommitResource
GetCommit depends on the body of both the commit and parent being parsed, to get the subject. Change-Id: Ic33854a129926e4138e21a57e9218969486720be
This commit is contained in:
		| @@ -70,11 +70,12 @@ public class CommitsCollection implements | |||||||
|       RevWalk rw = new RevWalk(repo); |       RevWalk rw = new RevWalk(repo); | ||||||
|       try { |       try { | ||||||
|         RevCommit commit = rw.parseCommit(objectId); |         RevCommit commit = rw.parseCommit(objectId); | ||||||
|  |         rw.parseBody(commit); | ||||||
|         if (!parent.getControl().canReadCommit(db.get(), rw, commit)) { |         if (!parent.getControl().canReadCommit(db.get(), rw, commit)) { | ||||||
|           throw new ResourceNotFoundException(id); |           throw new ResourceNotFoundException(id); | ||||||
|         } |         } | ||||||
|         for (int i = 0; i < commit.getParentCount(); i++) { |         for (int i = 0; i < commit.getParentCount(); i++) { | ||||||
|           rw.parseCommit(commit.getParent(i)); |           rw.parseBody(rw.parseCommit(commit.getParent(i))); | ||||||
|         } |         } | ||||||
|         return new CommitResource(parent, commit); |         return new CommitResource(parent, commit); | ||||||
|       } catch (MissingObjectException | IncorrectObjectTypeException e) { |       } catch (MissingObjectException | IncorrectObjectTypeException e) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dave Borowitz
					Dave Borowitz