From 229387cf80566b436480ed8e048236a72c00cc23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Berg?= Date: Mon, 5 Apr 2010 10:52:21 +0200 Subject: [PATCH] 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. --- PBGitRepository.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PBGitRepository.m b/PBGitRepository.m index 9ad8c24..22100b9 100644 --- a/PBGitRepository.m +++ b/PBGitRepository.m @@ -349,6 +349,10 @@ static NSString * repositoryBasePath = nil; return nil; NSArray *revList = revisionList.projectCommits; + if (!revList) { + [revisionList forceUpdate]; + revList = revisionList.projectCommits; + } for (PBGitCommit *commit in revList) if ([[commit realSha] isEqualToString:sha]) return commit;