Testing: add missing file
[GitX.git] / PBGitLane.h
blob57d59c8d856ee348134999d6a0defae6f29af933
1 //
2 // PBGitLane.h
3 // GitX
4 //
5 // Created by Pieter de Bie on 27-08-08.
6 // Copyright 2008 __MyCompanyName__. All rights reserved.
7 //
8 #import <Cocoa/Cocoa.h>
9 #include "git/oid.h"
11 class PBGitLane {
12 static int s_colorIndex;
14 git_oid d_sha;
15 int d_index;
17 public:
19 PBGitLane(git_oid *sha)
21 d_index = s_colorIndex++;
22 d_sha = *sha;
25 PBGitLane(NSString *sha)
27 git_oid_mkstr(&d_sha, [sha UTF8String]);
28 d_index = s_colorIndex++;
31 PBGitLane()
33 d_index = s_colorIndex++;
36 bool isCommit(git_oid *sha) const
38 return !git_oid_cmp(&d_sha, sha);
41 void setSha(git_oid sha);
43 git_oid const *sha() const
45 return &d_sha;
48 int index() const;
50 static void resetColors();