Skip to content

Commit 427409b

Browse files
andrebergbrotherbard
authored andcommitted
Populate the revList if empty in -commitForSHA:
I found that at a few points logic was based on items from revList but at that point in the execution the revList was always empty.
1 parent dac9bd3 commit 427409b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

PBGitRepository.m

+4
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@ - (PBGitCommit *) commitForSHA:(NSString *)sha
333333
return nil;
334334
NSArray *revList = revisionList.projectCommits;
335335

336+
if (!revList) {
337+
[revisionList forceUpdate];
338+
revList = revisionList.projectCommits;
339+
}
336340
for (PBGitCommit *commit in revList)
337341
if ([[commit realSha] isEqualToString:sha])
338342
return commit;

0 commit comments

Comments
 (0)