diff --git a/PBGitGrapher.m b/PBGitGrapher.m index 2fad4dd..f3af7ae 100644 --- a/PBGitGrapher.m +++ b/PBGitGrapher.m @@ -17,6 +17,7 @@ refs = repo.refs; repository = repo; previousLanes = [NSMutableArray array]; + [PBGitLane resetColors]; return self; } diff --git a/PBGitLane.h b/PBGitLane.h index dc5aa12..ab89cbb 100644 --- a/PBGitLane.h +++ b/PBGitLane.h @@ -15,6 +15,8 @@ - (id) initWithCommit: (NSString*) c; - (BOOL) isCommit: (NSString*) c; ++ (void) resetColors; + @property(assign) NSString* sha; @property(readonly) int index; diff --git a/PBGitLane.m b/PBGitLane.m index 05dabe8..2d80d94 100644 --- a/PBGitLane.m +++ b/PBGitLane.m @@ -14,6 +14,12 @@ static int PBGITLANE_CURRENT_INDEX = 0; @synthesize sha, index; + ++ (void) resetColors +{ + PBGITLANE_CURRENT_INDEX = 0; +} + - (id) initWithCommit: (NSString*) c { index = PBGITLANE_CURRENT_INDEX++;