From d21926e213c1da59d1327d0f7e9e2b4756ca2654 Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Thu, 28 Aug 2008 02:55:15 +0200 Subject: [PATCH] Don't draw lanes if we don't have any parents anymore --- PBGitGrapher.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PBGitGrapher.m b/PBGitGrapher.m index 08324eb..a264f3b 100644 --- a/PBGitGrapher.m +++ b/PBGitGrapher.m @@ -126,7 +126,11 @@ previous.numColumns = [currentLanes count] - 1; else previous.numColumns = [currentLanes count]; - currentLane.sha = [commit.parents objectAtIndex:0]; + + if ([commit.parents count] > 0 && ![[commit.parents objectAtIndex:0] isEqualToString:@""]) + currentLane.sha = [commit.parents objectAtIndex:0]; + else + [currentLanes removeObject:currentLane]; previousLanes = currentLanes; [cellsInfo addObject: previous];