<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitmodules</filename>
    </added>
    <added>
      <filename>libgit2</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -80,6 +80,8 @@
 		F5AD56790E79B78100EDAAFE /* PBCommitList.m in Sources */ = {isa = PBXBuildFile; fileRef = F5AD56780E79B78100EDAAFE /* PBCommitList.m */; };
 		F5B721C40E05CF7E00AF29DC /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F5B721C20E05CF7E00AF29DC /* MainMenu.xib */; };
 		F5C007750E731B48007B84B2 /* PBGitRef.m in Sources */ = {isa = PBXBuildFile; fileRef = F5C007740E731B48007B84B2 /* PBGitRef.m */; };
+		F5C580E50EDA250900995434 /* libgit2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C580E40EDA250900995434 /* libgit2.a */; };
+		F5C580F50EDA251100995434 /* libgit2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C580E40EDA250900995434 /* libgit2.a */; };
 		F5C6F68D0E65FF9300478D97 /* PBGitLane.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5C6F68C0E65FF9300478D97 /* PBGitLane.mm */; };
 		F5DFFA6C0E075D8800617813 /* PBEasyFS.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DFFA6B0E075D8800617813 /* PBEasyFS.m */; };
 		F5E424110EA3E4D60046E362 /* PBDiffWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = F5E424100EA3E4D60046E362 /* PBDiffWindow.xib */; };
@@ -214,6 +216,7 @@
 		F5B721C30E05CF7E00AF29DC /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = &quot;&lt;group&gt;&quot;; };
 		F5C007730E731B48007B84B2 /* PBGitRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRef.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		F5C007740E731B48007B84B2 /* PBGitRef.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRef.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		F5C580E40EDA250900995434 /* libgit2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgit2.a; path = libgit2/libgit2.a; sourceTree = &quot;&lt;group&gt;&quot;; };
 		F5C6F68B0E65FF9300478D97 /* PBGitLane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitLane.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		F5C6F68C0E65FF9300478D97 /* PBGitLane.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PBGitLane.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
 		F5D2DC850EA401A80034AD24 /* PBGitConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitConfig.h; sourceTree = &quot;&lt;group&gt;&quot;; };
@@ -259,6 +262,7 @@
 				911112370E5A097800BF76B4 /* Security.framework in Frameworks */,
 				F580E6AE0E733276009E2D3F /* Sparkle.framework in Frameworks */,
 				F5E4DBFB0EAB58D90013FAFC /* SystemConfiguration.framework in Frameworks */,
+				F5C580E50EDA250900995434 /* libgit2.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -273,6 +277,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				F5C580F50EDA251100995434 /* libgit2.a in Frameworks */,
 				F5886A1E0ED5D3880066E74C /* Cocoa.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -375,6 +380,7 @@
 		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				F5C580E40EDA250900995434 /* libgit2.a */,
 				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
 				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
 			);
@@ -578,6 +584,7 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = 26FC0A840875C7B200E6366F /* Build configuration list for PBXNativeTarget &quot;GitX&quot; */;
 			buildPhases = (
+				F5792DFB0EDB570C001B0C31 /* Compilie libgit2 */,
 				8D1107290486CEB800E47090 /* Resources */,
 				8D11072C0486CEB800E47090 /* Sources */,
 				8D11072E0486CEB800E47090 /* Frameworks */,
@@ -683,6 +690,20 @@
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
+		F5792DFB0EDB570C001B0C31 /* Compilie libgit2 */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = &quot;Compilie libgit2&quot;;
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = &quot;git submodule init\ngit submodule update\ncd libgit2\nrm -f libgit2.a\nmake CFLAGS=\&quot;-arch i386 -arch ppc\&quot;\nranlib libgit2.a&quot;;
+		};
 		F5CF04A20EAE696C00D75C81 /* Copy HTML files */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
@@ -840,8 +861,10 @@
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = GitX_Prefix.pch;
+				HEADER_SEARCH_PATHS = libgit2/src;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = &quot;$(HOME)/Applications&quot;;
+				LIBRARY_SEARCH_PATHS = libgit2;
 				PRODUCT_NAME = GitX;
 				WRAPPER_EXTENSION = app;
 				ZERO_LINK = YES;
@@ -860,8 +883,10 @@
 				GCC_MODEL_TUNING = G5;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = GitX_Prefix.pch;
+				HEADER_SEARCH_PATHS = libgit2/src;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = &quot;$(HOME)/Applications&quot;;
+				LIBRARY_SEARCH_PATHS = libgit2;
 				PRODUCT_NAME = GitX;
 				WRAPPER_EXTENSION = app;
 			};
@@ -904,6 +929,7 @@
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = &quot;$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h&quot;;
 				INSTALL_PATH = /usr/local/bin;
+				LIBRARY_SEARCH_PATHS = libgit2;
 				OTHER_LDFLAGS = (
 					&quot;-framework&quot;,
 					Foundation,
@@ -926,6 +952,7 @@
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = &quot;$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h&quot;;
 				INSTALL_PATH = /usr/local/bin;
+				LIBRARY_SEARCH_PATHS = libgit2;
 				OTHER_LDFLAGS = (
 					&quot;-framework&quot;,
 					Foundation,
@@ -949,10 +976,13 @@
 				GCC_OPTIMIZATION_LEVEL = 2;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = GitX_Prefix.pch;
+				HEADER_SEARCH_PATHS = libgit2/src;
 				INFOPLIST_FILE = &quot;SpeedTest-Info.plist&quot;;
 				INSTALL_PATH = &quot;$(HOME)/Applications&quot;;
+				LIBRARY_SEARCH_PATHS = libgit2;
 				OTHER_CFLAGS = &quot;-DCLI&quot;;
 				OTHER_LDFLAGS = (
+					&quot;-L.&quot;,
 					&quot;-framework&quot;,
 					Foundation,
 					&quot;-framework&quot;,
@@ -976,6 +1006,7 @@
 				GCC_PREFIX_HEADER = &quot;$(SYSTEM_LIBRARY_DIR)/Frameworks/UIKit.framework/Headers/UIKit.h&quot;;
 				INFOPLIST_FILE = &quot;SpeedTest-Info.plist&quot;;
 				INSTALL_PATH = &quot;$(HOME)/Applications&quot;;
+				LIBRARY_SEARCH_PATHS = libgit2;
 				OTHER_LDFLAGS = (
 					&quot;-framework&quot;,
 					Foundation,</diff>
      <filename>GitX.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -9,9 +9,10 @@
 #import &lt;Cocoa/Cocoa.h&gt;
 #import &quot;PBGitRepository.h&quot;
 #import &quot;PBGitTree.h&quot;
+#include &quot;git/oid.h&quot;
 
 @interface PBGitCommit : NSObject {
-	NSString* sha;
+	git_oid sha;
 	NSString* subject;
 	NSString* author;
 	NSString* details;
@@ -24,12 +25,14 @@
 	PBGitRepository* repository;
 }
 
-- initWithRepository:(PBGitRepository*) repo andSha:(NSString*) sha;
+- initWithRepository:(PBGitRepository *)repo andSha:(git_oid)sha;
 
 - (void)addRef:(id)ref;
 - (void)removeRef:(id)ref;
 
-@property (copy) NSString* sha;
+- (NSString *)realSha;
+
+@property (readonly) git_oid *sha;
 @property (copy) NSString* subject;
 @property (copy) NSString* author;
 @property (retain) NSArray* parents;</diff>
      <filename>PBGitCommit.h</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,7 @@
 
 @implementation PBGitCommit
 
-@synthesize sha, repository, subject, author, date, parents, sign, lineInfo, refs;
+@synthesize repository, subject, author, date, parents, sign, lineInfo, refs;
 
 
 - (NSString *) dateString
@@ -25,14 +25,27 @@
 	return self.tree.children;
 }
 
-- initWithRepository:(PBGitRepository*) repo andSha:(NSString*) newSha
+- (git_oid *)sha
+{
+	return &amp;sha;
+}
+
+- initWithRepository:(PBGitRepository*) repo andSha:(git_oid)newSha
 {
 	details = nil;
-	self.repository = repo;
-	self.sha = newSha;
+	repository = repo;
+	sha = newSha;
 	return self;
 }
 
+- (NSString *)realSha
+{
+	char *hex = git_oid_mkhex(&amp;sha);
+	NSString *str = [NSString stringWithUTF8String:hex];
+	free(hex);
+	return str;
+}
+
 // NOTE: This method should remain threadsafe, as we load it in async
 // from the web view.
 - (NSString*) details
@@ -40,7 +53,7 @@
 	if (details != nil)
 		return details;
 
-	details = [self.repository outputForCommand:[@&quot;show --pretty=raw &quot; stringByAppendingString:self.sha]];
+	details = [self.repository outputForCommand:[@&quot;show --pretty=raw &quot; stringByAppendingString:[self realSha]]];
 	
 	return details;
 }</diff>
      <filename>PBGitCommit.m</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,9 @@
 @interface PBGitGrapher : NSObject {
 	PBGraphCellInfo* previous;
 	void *pl;
+	void *storage;
+	int curLane;
+
 	NSDictionary* refs;
 	PBGitRepository* repository;
 }</diff>
      <filename>PBGitGrapher.h</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,10 @@
 //  Copyright 2008 __MyCompanyName__. All rights reserved.
 //
 
+extern &quot;C&quot; {
+#import &quot;git/oid.h&quot;
+}
+
 #import &quot;PBGitGrapher.h&quot;
 #import &quot;PBGitCommit.h&quot;
 #import &quot;PBGitLane.h&quot;
@@ -31,7 +35,6 @@ using namespace std;
 
 - (void) decorateCommit: (PBGitCommit *) commit
 {
-	//NSLog(@&quot;Decoriting commit %@&quot;, commit.sha);
 	int i = 0, newPos = -1;
 	std::vector&lt;PBGitLane *&gt; *currentLanes = new std::vector&lt;PBGitLane *&gt;;
 	std::vector&lt;PBGitLane *&gt; *previousLanes = (std::vector&lt;PBGitLane *&gt; *)pl;
@@ -48,7 +51,6 @@ using namespace std;
 			i++;
 			// This is our commit! We should do a &quot;merge&quot;: move the line from
 			// our upperMapping to their lowerMapping
-
 			if ((*it)-&gt;isCommit([commit sha])) {
 				if (!didFirst) {
 					didFirst = YES;
@@ -116,7 +118,7 @@ using namespace std;
 	// This boolean will tell us if that happened
 	BOOL addedParent = NO;
 
-	for (NSString* parent in [commit.parents subarrayWithRange:NSMakeRange(1, [commit.parents count] -1)]) {
+	for (NSString *parent in [commit.parents subarrayWithRange:NSMakeRange(1, [commit.parents count] -1)]) {
 		int i = 0;
 		BOOL was_displayed = NO;
 		std::vector&lt;PBGitLane *&gt;::iterator it = currentLanes-&gt;begin();</diff>
      <filename>PBGitGrapher.mm</filename>
    </modified>
    <modified>
      <diff>@@ -3,14 +3,14 @@
 	&lt;data&gt;
 		&lt;int key=&quot;IBDocument.SystemTarget&quot;&gt;1050&lt;/int&gt;
 		&lt;string key=&quot;IBDocument.SystemVersion&quot;&gt;9F33&lt;/string&gt;
-		&lt;string key=&quot;IBDocument.InterfaceBuilderVersion&quot;&gt;672&lt;/string&gt;
+		&lt;string key=&quot;IBDocument.InterfaceBuilderVersion&quot;&gt;670&lt;/string&gt;
 		&lt;string key=&quot;IBDocument.AppKitVersion&quot;&gt;949.34&lt;/string&gt;
 		&lt;string key=&quot;IBDocument.HIToolboxVersion&quot;&gt;352.00&lt;/string&gt;
 		&lt;object class=&quot;NSMutableArray&quot; key=&quot;IBDocument.EditedObjectIDs&quot;&gt;
 			&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 			&lt;integer value=&quot;236&quot;/&gt;
+			&lt;integer value=&quot;27&quot;/&gt;
 			&lt;integer value=&quot;263&quot;/&gt;
-			&lt;integer value=&quot;11&quot;/&gt;
 		&lt;/object&gt;
 		&lt;object class=&quot;NSArray&quot; key=&quot;IBDocument.PluginDependencies&quot;&gt;
 			&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
@@ -2362,87 +2362,6 @@
 						&lt;reference key=&quot;parent&quot; ref=&quot;555671215&quot;/&gt;
 					&lt;/object&gt;
 					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;3&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;663765878&quot;/&gt;
-						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
-							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-							&lt;reference ref=&quot;942510576&quot;/&gt;
-							&lt;reference ref=&quot;452331733&quot;/&gt;
-							&lt;reference ref=&quot;152625445&quot;/&gt;
-							&lt;reference ref=&quot;254268962&quot;/&gt;
-						&lt;/object&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;202620420&quot;/&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;30&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;942510576&quot;/&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;663765878&quot;/&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;29&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;452331733&quot;/&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;663765878&quot;/&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;28&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;152625445&quot;/&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;663765878&quot;/&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;27&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;254268962&quot;/&gt;
-						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
-							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-							&lt;reference ref=&quot;976830280&quot;/&gt;
-							&lt;reference ref=&quot;1025472344&quot;/&gt;
-							&lt;reference ref=&quot;792589327&quot;/&gt;
-						&lt;/object&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;663765878&quot;/&gt;
-						&lt;string key=&quot;objectName&quot;&gt;Commit List&lt;/string&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;33&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;976830280&quot;/&gt;
-						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
-							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-							&lt;reference ref=&quot;853819733&quot;/&gt;
-						&lt;/object&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;254268962&quot;/&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;32&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;1025472344&quot;/&gt;
-						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
-							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-							&lt;reference ref=&quot;977219207&quot;/&gt;
-						&lt;/object&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;254268962&quot;/&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;31&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;792589327&quot;/&gt;
-						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
-							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-							&lt;reference ref=&quot;746918365&quot;/&gt;
-						&lt;/object&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;254268962&quot;/&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;36&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;746918365&quot;/&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;792589327&quot;/&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;35&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;977219207&quot;/&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;1025472344&quot;/&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
-						&lt;int key=&quot;objectID&quot;&gt;34&lt;/int&gt;
-						&lt;reference key=&quot;object&quot; ref=&quot;853819733&quot;/&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;976830280&quot;/&gt;
-					&lt;/object&gt;
-					&lt;object class=&quot;IBObjectRecord&quot;&gt;
 						&lt;int key=&quot;objectID&quot;&gt;231&lt;/int&gt;
 						&lt;reference key=&quot;object&quot; ref=&quot;892732705&quot;/&gt;
 						&lt;reference key=&quot;parent&quot; ref=&quot;1002&quot;/&gt;
@@ -2686,6 +2605,87 @@
 						&lt;reference key=&quot;object&quot; ref=&quot;882172208&quot;/&gt;
 						&lt;reference key=&quot;parent&quot; ref=&quot;604026377&quot;/&gt;
 					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;3&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;663765878&quot;/&gt;
+						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
+							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
+							&lt;reference ref=&quot;254268962&quot;/&gt;
+							&lt;reference ref=&quot;152625445&quot;/&gt;
+							&lt;reference ref=&quot;452331733&quot;/&gt;
+							&lt;reference ref=&quot;942510576&quot;/&gt;
+						&lt;/object&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;202620420&quot;/&gt;
+					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;27&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;254268962&quot;/&gt;
+						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
+							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
+							&lt;reference ref=&quot;792589327&quot;/&gt;
+							&lt;reference ref=&quot;1025472344&quot;/&gt;
+							&lt;reference ref=&quot;976830280&quot;/&gt;
+						&lt;/object&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;663765878&quot;/&gt;
+						&lt;string key=&quot;objectName&quot;&gt;Commit List&lt;/string&gt;
+					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;31&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;792589327&quot;/&gt;
+						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
+							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
+							&lt;reference ref=&quot;746918365&quot;/&gt;
+						&lt;/object&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;254268962&quot;/&gt;
+					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;36&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;746918365&quot;/&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;792589327&quot;/&gt;
+					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;32&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;1025472344&quot;/&gt;
+						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
+							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
+							&lt;reference ref=&quot;977219207&quot;/&gt;
+						&lt;/object&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;254268962&quot;/&gt;
+					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;35&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;977219207&quot;/&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;1025472344&quot;/&gt;
+					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;33&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;976830280&quot;/&gt;
+						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
+							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
+							&lt;reference ref=&quot;853819733&quot;/&gt;
+						&lt;/object&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;254268962&quot;/&gt;
+					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;34&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;853819733&quot;/&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;976830280&quot;/&gt;
+					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;28&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;152625445&quot;/&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;663765878&quot;/&gt;
+					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;29&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;452331733&quot;/&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;663765878&quot;/&gt;
+					&lt;/object&gt;
+					&lt;object class=&quot;IBObjectRecord&quot;&gt;
+						&lt;int key=&quot;objectID&quot;&gt;30&lt;/int&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;942510576&quot;/&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;663765878&quot;/&gt;
+					&lt;/object&gt;
 				&lt;/object&gt;
 			&lt;/object&gt;
 			&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;flattenedProperties&quot;&gt;
@@ -2796,7 +2796,7 @@
 					&lt;string&gt;com.apple.InterfaceBuilderKit&lt;/string&gt;
 					&lt;string&gt;com.apple.InterfaceBuilder.CocoaPlugin&lt;/string&gt;
 					&lt;string&gt;com.apple.InterfaceBuilder.CocoaPlugin&lt;/string&gt;
-					&lt;string&gt;{{69, 366}, {616, 227}}&lt;/string&gt;
+					&lt;string&gt;{{312, 366}, {616, 227}}&lt;/string&gt;
 					&lt;string&gt;com.apple.InterfaceBuilder.CocoaPlugin&lt;/string&gt;
 					&lt;string&gt;{{132, 614}, {616, 0}}&lt;/string&gt;
 					&lt;string&gt;com.apple.InterfaceBuilder.CocoaPlugin&lt;/string&gt;</diff>
      <filename>PBGitHistoryView.xib</filename>
    </modified>
    <modified>
      <diff>@@ -6,32 +6,46 @@
 //  Copyright 2008 __MyCompanyName__. All rights reserved.
 //
 #import &lt;Cocoa/Cocoa.h&gt;
+extern &quot;C&quot;
+{
+#include &quot;git/oid.h&quot;
+}
 
 class PBGitLane {
 	static int s_colorIndex;
 
-	NSString *d_sha;
+	git_oid d_sha;
 	int d_index;
 
 public:
 
+	PBGitLane(git_oid sha)
+	{
+		d_index = s_colorIndex++;
+		d_sha = sha;
+	}
+
 	PBGitLane(NSString *sha)
 	{
+		git_oid_mkstr(&amp;d_sha, [sha UTF8String]);
 		d_index = s_colorIndex++;
-		d_sha = [sha copy];
 	}
 	
 	PBGitLane()
 	{
 		d_index = s_colorIndex++;
-		d_sha = NULL;
+		//d_sha = NULL;
 	}
 	
+	bool isCommit(git_oid *sha) const;
 	bool isCommit(NSString *sha) const;
+	
+	void setSha(git_oid sha);
 	void setSha(NSString *sha);
-	NSString *sha() const
+	
+	git_oid const *sha() const
 	{
-		return [d_sha copy];
+		return &amp;d_sha;
 	}
 	
 	int index() const;</diff>
      <filename>PBGitLane.h</filename>
    </modified>
    <modified>
      <diff>@@ -24,10 +24,22 @@
 
 int PBGitLane::s_colorIndex = 0;
 
+static git_oid str_to_oid(NSString *str)
+{
+	git_oid oid;
+	git_oid_mkstr(&amp;oid, [str UTF8String]);
+	return oid;
+}
+
+bool PBGitLane::isCommit(git_oid *sha) const
+{
+	return !git_oid_cmp(&amp;d_sha, sha);
+}
+
 bool PBGitLane::isCommit(NSString *sha) const
 {
-	//NSLog(@&quot;Comparing %@ with %@&quot;, d_sha, sha);
-	return [d_sha isEqualToString:sha];
+	git_oid a = str_to_oid(sha);
+	return isCommit(&amp;a);
 }
 
 int PBGitLane::index() const
@@ -35,11 +47,17 @@ int PBGitLane::index() const
 	return d_index;
 }
 
-void PBGitLane::setSha(NSString *sha)
+void PBGitLane::setSha(git_oid sha)
 {
 	d_sha = sha;
 }
 
+void PBGitLane::setSha(NSString *sha)
+{
+	return setSha(str_to_oid(sha));
+}
+
+
 void PBGitLane::resetColors()
 {
 	s_colorIndex = 0;</diff>
      <filename>PBGitLane.mm</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,11 @@
 //  Copyright 2008 __MyCompanyName__. All rights reserved.
 //
 
+extern &quot;C&quot;
+{
+#include &quot;git/oid.h&quot;
+}
+
 #import &quot;PBGitRevList.h&quot;
 #import &quot;PBGitRepository.h&quot;
 #import &quot;PBGitCommit.h&quot;
@@ -116,7 +121,9 @@ using namespace std;
 		}
 
 		// From now on, 1.2 seconds
-		PBGitCommit* newCommit = [[PBGitCommit alloc] initWithRepository: repository andSha: [NSString stringWithUTF8String:sha.c_str()]];
+		git_oid oid;
+		git_oid_mkstr(&amp;oid, sha.c_str());
+		PBGitCommit* newCommit = [[PBGitCommit alloc] initWithRepository:repository andSha:oid];
 
 		string author;
 		getline(stream, author, '\0');
@@ -154,11 +161,11 @@ using namespace std;
 		}
 
 		[revisions addObject: newCommit];
-		//[g decorateCommit: newCommit];
+		[g decorateCommit: newCommit];
 		
 		// 0.1 second on linux-2.6
-		if (refs &amp;&amp; [refs objectForKey:newCommit.sha])
-			newCommit.refs = [refs objectForKey:newCommit.sha];
+		if (refs &amp;&amp; [refs objectForKey:[newCommit realSha]])
+			newCommit.refs = [refs objectForKey:[newCommit realSha]];
 		
 		if (++num % 1000 == 0)
 			[self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:NO];</diff>
      <filename>PBGitRevList.mm</filename>
    </modified>
    <modified>
      <diff>@@ -22,7 +22,7 @@
 	PBGitTree* tree = [[self alloc] init];
 	tree.parent = nil;
 	tree.leaf = NO;
-	tree.sha = c.sha;
+	tree.sha = [c realSha];
 	tree.repository = c.repository;
 	tree.path = @&quot;&quot;;
 	return tree;</diff>
      <filename>PBGitTree.m</filename>
    </modified>
    <modified>
      <diff>@@ -38,12 +38,12 @@
 		return;
 
 	// The sha is the same, but refs may have changed.. reload it lazy
-	if ([currentSha isEqualToString: content.sha])
+	if ([currentSha isEqualToString: [content realSha]])
 	{
 		[[self script] callWebScriptMethod:@&quot;reload&quot; withArguments: nil];
 		return;
 	}
-	currentSha = content.sha;
+	currentSha = [content realSha];
 
 	NSArray *arguments = [NSArray arrayWithObjects:content, [[[historyController repository] headRef] simpleRef], nil];
 	[[self script] callWebScriptMethod:@&quot;loadCommit&quot; withArguments: arguments];</diff>
      <filename>PBWebHistoryController.m</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ var Commit = function(obj) {
 
 	this.refs = obj.refs;
 	this.author_name = obj.author;
-	this.sha = obj.sha;
+	this.sha = obj.realSha();
 	this.parents = obj.parents;
 	this.subject = obj.subject;
 </diff>
      <filename>html/views/history/history.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1a7ad9415f7b636cb10a62c0a84a5f0b7e52c4fb</id>
    </parent>
  </parents>
  <author>
    <name>Pieter de Bie</name>
    <email>pdebie@ai.rug.nl</email>
  </author>
  <url>http://github.com/pieter/gitx/commit/d2eafc2d52967cbd4fd99e00fbecb750fca30249</url>
  <id>d2eafc2d52967cbd4fd99e00fbecb750fca30249</id>
  <committed-date>2008-11-24T13:53:48-08:00</committed-date>
  <authored-date>2008-11-21T01:18:18-08:00</authored-date>
  <message>Include libgit2 as submodule and use it to store sha's

This reduces GitX's memory usage and makes some operations much faster,
like graphing, by having a cheaper comparison</message>
  <tree>9d3d6f4d6edf61873c6666eb263f980726abb060</tree>
  <committer>
    <name>Pieter de Bie</name>
    <email>pdebie@ai.rug.nl</email>
  </committer>
</commit>
