Permalink
Browse files

Add a search field and subject

  • Loading branch information...
1 parent 0fda285 commit b752f5bc02243d4956703835733276e4389a174b @pieter committed Jun 14, 2008
View
45 English.lproj/MainMenu.nib/classes.nib
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBClasses</key>
- <array>
- <dict>
- <key>CLASS</key>
- <string>PBGitRepository</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSObject</string>
- </dict>
- <dict>
- <key>ACTIONS</key>
- <dict>
- <key>clickButton</key>
- <string>id</string>
- <key>getData</key>
- <string>id</string>
- <key>saveAction</key>
- <string>id</string>
- </dict>
- <key>CLASS</key>
- <string>GitTest_AppDelegate</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>OUTLETS</key>
- <dict>
- <key>listOfCommits</key>
- <string>NSArray</string>
- <key>repository</key>
- <string>PBGitRepository</string>
- <key>window</key>
- <string>NSWindow</string>
- </dict>
- <key>SUPERCLASS</key>
- <string>NSObject</string>
- </dict>
- </array>
- <key>IBVersion</key>
- <string>1</string>
-</dict>
-</plist>
View
3,744 English.lproj/MainMenu.nib/designable.nib
3,744 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
20 English.lproj/MainMenu.nib/info.nib
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBFramework Version</key>
- <string>629</string>
- <key>IBLastKnownRelativeProjectPath</key>
- <string>../../GitTest.xcodeproj</string>
- <key>IBOldestOS</key>
- <integer>5</integer>
- <key>IBOpenObjects</key>
- <array>
- <integer>2</integer>
- </array>
- <key>IBSystem Version</key>
- <string>9D34</string>
- <key>targetFramework</key>
- <string>IBCocoaFramework</string>
-</dict>
-</plist>
View
BIN English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown.
View
3,061 GitTest.xcodeproj/pieter.pbxuser
1,934 additions, 1,127 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
235 GitTest.xcodeproj/pieter.perspectivev3
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>ActivePerspectiveName</key>
- <string>Project</string>
+ <string>Debug</string>
<key>AllowedModules</key>
<array>
<dict>
@@ -200,8 +200,8 @@
<array/>
<key>PerspectiveWidths</key>
<array>
- <integer>1163</integer>
- <integer>1163</integer>
+ <integer>1168</integer>
+ <integer>1168</integer>
</array>
<key>Perspectives</key>
<array>
@@ -270,6 +270,7 @@
<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
<array>
<string>29B97314FDCFA39411CA2CEA</string>
+ <string>7756732906782D8800D1FEB8</string>
<string>080E96DDFE201D6D7F000001</string>
<string>29B97315FDCFA39411CA2CEA</string>
<string>29B97317FDCFA39411CA2CEA</string>
@@ -278,13 +279,13 @@
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>4</integer>
- <integer>2</integer>
+ <integer>11</integer>
+ <integer>3</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 0}, {211, 756}}</string>
+ <string>{{0, 0}, {211, 830}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
@@ -294,14 +295,12 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {228, 774}}</string>
+ <string>{{0, 0}, {228, 848}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>MainColumn</string>
<real>211</real>
</array>
- <key>RubberWindowFrame</key>
- <string>527 151 1163 815 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -312,124 +311,84 @@
<key>Dock</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>F574AFBB0E01D65800AF2716</string>
<key>PBXProjectModuleLabel</key>
- <string>GitTest_AppDelegate.m</string>
+ <string>PBGitCommit.m</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>F574AFBC0E01D65800AF2716</string>
<key>PBXProjectModuleLabel</key>
- <string>GitTest_AppDelegate.m</string>
+ <string>PBGitCommit.m</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>F5945F030E02BC7800706420</string>
+ <string>F56525C60E03435900F03B52</string>
<key>history</key>
<array>
- <string>F5945EED0E02BC3900706420</string>
- <string>F5945EEF0E02BC3900706420</string>
- <string>F5945EFD0E02BC6900706420</string>
- <string>F5945EFE0E02BC6900706420</string>
+ <string>F56524DE0E02D30200F03B52</string>
+ <string>F56524DF0E02D30200F03B52</string>
+ <string>F56525740E033DBB00F03B52</string>
+ <string>F56525B20E03412400F03B52</string>
+ <string>F56525B30E03412400F03B52</string>
+ <string>F56525C00E03435300F03B52</string>
+ <string>F56525C10E03435300F03B52</string>
+ <string>F565256F0E033D4700F03B52</string>
</array>
<key>prevStack</key>
<array>
<string>F574AFED0E01D92400AF2716</string>
<string>F574AFF50E01D95B00AF2716</string>
- <string>F5945E1E0E02B23000706420</string>
<string>F5945E1F0E02B23000706420</string>
<string>F5945E200E02B23000706420</string>
- <string>F5945E210E02B23000706420</string>
- <string>F5945E220E02B23000706420</string>
- <string>F5945E230E02B23000706420</string>
- <string>F5945E240E02B23000706420</string>
- <string>F5945E250E02B23000706420</string>
- <string>F5945E260E02B23000706420</string>
- <string>F5945E270E02B23000706420</string>
- <string>F5945E280E02B23000706420</string>
- <string>F5945E290E02B23000706420</string>
- <string>F5945E2A0E02B23000706420</string>
- <string>F5945E2B0E02B23000706420</string>
- <string>F5945E2C0E02B23000706420</string>
- <string>F5945E2D0E02B23000706420</string>
- <string>F5945E2E0E02B23000706420</string>
- <string>F5945E2F0E02B23000706420</string>
- <string>F5945E300E02B23000706420</string>
- <string>F5945E310E02B23000706420</string>
- <string>F5945E320E02B23000706420</string>
- <string>F5945E330E02B23000706420</string>
- <string>F5945E3E0E02B3ED00706420</string>
- <string>F5945E3F0E02B3ED00706420</string>
- <string>F5945E400E02B3ED00706420</string>
- <string>F5945E410E02B3ED00706420</string>
- <string>F5945E420E02B3ED00706420</string>
- <string>F5945E430E02B3ED00706420</string>
- <string>F5945E440E02B3ED00706420</string>
- <string>F5945E450E02B3ED00706420</string>
- <string>F5945E460E02B3ED00706420</string>
- <string>F5945E470E02B3ED00706420</string>
- <string>F5945E480E02B3ED00706420</string>
- <string>F5945E490E02B3ED00706420</string>
- <string>F5945E4A0E02B3ED00706420</string>
- <string>F5945E650E02B47100706420</string>
- <string>F5945E660E02B47100706420</string>
- <string>F5945E670E02B47100706420</string>
- <string>F5945E6C0E02B4B200706420</string>
- <string>F5945E750E02B4EF00706420</string>
- <string>F5945E760E02B4EF00706420</string>
- <string>F5945E890E02B57900706420</string>
- <string>F5945E8A0E02B57900706420</string>
- <string>F5945E8B0E02B57900706420</string>
- <string>F5945E8C0E02B57900706420</string>
- <string>F5945E8D0E02B57900706420</string>
- <string>F5945E8E0E02B57900706420</string>
- <string>F5945E8F0E02B57900706420</string>
- <string>F5945E900E02B57900706420</string>
- <string>F5945E910E02B57900706420</string>
- <string>F5945E920E02B57900706420</string>
- <string>F5945EA20E02B5FB00706420</string>
- <string>F5945EA30E02B5FB00706420</string>
- <string>F5945EA40E02B5FB00706420</string>
- <string>F5945EA50E02B5FB00706420</string>
- <string>F5945EA60E02B5FB00706420</string>
- <string>F5945EA70E02B5FB00706420</string>
- <string>F5945EA80E02B5FB00706420</string>
- <string>F5945EA90E02B5FB00706420</string>
- <string>F5945EAA0E02B5FB00706420</string>
- <string>F5945EAB0E02B5FB00706420</string>
- <string>F5945EAC0E02B5FB00706420</string>
- <string>F5945EAD0E02B5FB00706420</string>
- <string>F5945EAE0E02B5FB00706420</string>
- <string>F5945EB40E02B62F00706420</string>
- <string>F5945EB80E02B66200706420</string>
- <string>F5945EDA0E02B93900706420</string>
- <string>F5945EDB0E02B93900706420</string>
- <string>F5945EDC0E02B93900706420</string>
- <string>F5945EDD0E02B93900706420</string>
- <string>F5945EDE0E02B93900706420</string>
- <string>F5945EDF0E02B93900706420</string>
- <string>F5945EE00E02B93900706420</string>
- <string>F5945EE10E02B93900706420</string>
- <string>F5945EE20E02B93900706420</string>
- <string>F5945EE30E02B93900706420</string>
- <string>F5945EE40E02B93900706420</string>
- <string>F5945EF10E02BC3900706420</string>
- <string>F5945EF20E02BC3900706420</string>
- <string>F5945EF30E02BC3900706420</string>
- <string>F5945EF40E02BC3900706420</string>
- <string>F5945EF50E02BC3900706420</string>
- <string>F5945EF60E02BC3900706420</string>
- <string>F5945EF70E02BC3900706420</string>
- <string>F5945EF80E02BC3900706420</string>
- <string>F5945EFF0E02BC6900706420</string>
- <string>F5945F000E02BC6900706420</string>
+ <string>F56524C20E02D24500F03B52</string>
+ <string>F56524CF0E02D26C00F03B52</string>
+ <string>F56524E20E02D30200F03B52</string>
+ <string>F56524E30E02D30200F03B52</string>
+ <string>F56524E40E02D30200F03B52</string>
+ <string>F56524E50E02D30200F03B52</string>
+ <string>F56524FE0E02D61500F03B52</string>
+ <string>F56524FF0E02D61500F03B52</string>
+ <string>F56525000E02D61500F03B52</string>
+ <string>F56525010E02D61500F03B52</string>
+ <string>F56525020E02D61500F03B52</string>
+ <string>F56525030E02D61500F03B52</string>
+ <string>F56525040E02D61500F03B52</string>
+ <string>F56525050E02D61500F03B52</string>
+ <string>F56525060E02D61500F03B52</string>
+ <string>F56525070E02D61500F03B52</string>
+ <string>F56525080E02D61500F03B52</string>
+ <string>F56525090E02D61500F03B52</string>
+ <string>F565250A0E02D61500F03B52</string>
+ <string>F565250B0E02D61500F03B52</string>
+ <string>F565250C0E02D61500F03B52</string>
+ <string>F565250D0E02D61500F03B52</string>
+ <string>F565252D0E02D73100F03B52</string>
+ <string>F565252E0E02D73100F03B52</string>
+ <string>F565252F0E02D73100F03B52</string>
+ <string>F56525300E02D73100F03B52</string>
+ <string>F56525310E02D73100F03B52</string>
+ <string>F56525320E02D73100F03B52</string>
+ <string>F56525330E02D73100F03B52</string>
+ <string>F56525340E02D73100F03B52</string>
+ <string>F56525350E02D73100F03B52</string>
+ <string>F56525360E02D73100F03B52</string>
+ <string>F56525490E02D7B400F03B52</string>
+ <string>F56525580E02D97300F03B52</string>
+ <string>F56525590E02D97300F03B52</string>
+ <string>F565255A0E02D97300F03B52</string>
+ <string>F56525700E033D4700F03B52</string>
+ <string>F56525750E033DBB00F03B52</string>
+ <string>F56525760E033DBB00F03B52</string>
+ <string>F56525B40E03412400F03B52</string>
+ <string>F56525B50E03412400F03B52</string>
+ <string>F56525C20E03435300F03B52</string>
+ <string>F56525C30E03435300F03B52</string>
</array>
</dict>
<key>SplitCount</key>
@@ -443,18 +402,16 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {930, 769}}</string>
- <key>RubberWindowFrame</key>
- <string>527 151 1163 815 0 0 1680 1028 </string>
+ <string>{{0, 0}, {935, 437}}</string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>769pt</string>
+ <string>437pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>0pt</string>
+ <string>406pt</string>
<key>Tabs</key>
<array>
<dict>
@@ -468,9 +425,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {930, -27}}</string>
- <key>RubberWindowFrame</key>
- <string>527 151 1163 815 0 0 1680 1028 </string>
+ <string>{{10, 27}, {935, 379}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -524,7 +479,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 31}, {603, 297}}</string>
+ <string>{{10, 27}, {935, 204}}</string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -533,7 +488,7 @@
</dict>
</array>
<key>Proportion</key>
- <string>930pt</string>
+ <string>935pt</string>
</dict>
</array>
<key>Name</key>
@@ -552,11 +507,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>F5945E0B0E02B09100706420</string>
+ <string>F56524B60E02D22300F03B52</string>
<string>1CA23ED40692098700951B8B</string>
- <string>F5945E0C0E02B09100706420</string>
+ <string>F56524B70E02D22300F03B52</string>
<string>F574AFBB0E01D65800AF2716</string>
- <string>F5945E0D0E02B09100706420</string>
+ <string>F56524B80E02D22300F03B52</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -593,6 +548,8 @@
<key>Layout</key>
<array>
<dict>
+ <key>BecomeActive</key>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
@@ -603,12 +560,14 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {1163, 398}}</string>
+ <string>{{0, 0}, {1168, 395}}</string>
+ <key>RubberWindowFrame</key>
+ <string>458 139 1168 889 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
- <string>398pt</string>
+ <string>395pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
@@ -627,8 +586,8 @@
<string>yes</string>
<key>sizes</key>
<array>
- <string>{{0, 0}, {567, 180}}</string>
- <string>{{567, 0}, {596, 180}}</string>
+ <string>{{0, 0}, {569, 217}}</string>
+ <string>{{569, 0}, {599, 217}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
@@ -643,8 +602,8 @@
<string>yes</string>
<key>sizes</key>
<array>
- <string>{{0, 0}, {1163, 180}}</string>
- <string>{{0, 180}, {1163, 191}}</string>
+ <string>{{0, 0}, {1168, 217}}</string>
+ <string>{{0, 217}, {1168, 231}}</string>
</array>
</dict>
</dict>
@@ -664,7 +623,7 @@
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
- <string>{{0, 403}, {1163, 371}}</string>
+ <string>{{0, 400}, {1168, 448}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
@@ -674,16 +633,20 @@
<string>Value</string>
<real>85</real>
<string>Summary</string>
- <real>366</real>
+ <real>369</real>
</array>
<key>Frame</key>
- <string>{{567, 0}, {596, 180}}</string>
+ <string>{{569, 0}, {599, 217}}</string>
+ <key>RubberWindowFrame</key>
+ <string>458 139 1168 889 0 0 1680 1028 </string>
</dict>
+ <key>RubberWindowFrame</key>
+ <string>458 139 1168 889 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
- <string>371pt</string>
+ <string>448pt</string>
</dict>
</array>
<key>Name</key>
@@ -701,14 +664,14 @@
</array>
<key>TableOfContents</key>
<array>
- <string>F5945E4C0E02B3ED00706420</string>
+ <string>F56524C40E02D24500F03B52</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
- <string>F5945E4D0E02B3ED00706420</string>
- <string>F5945E4E0E02B3ED00706420</string>
- <string>F5945E4F0E02B3ED00706420</string>
- <string>F5945E500E02B3ED00706420</string>
- <string>F5945E510E02B3ED00706420</string>
+ <string>F56524C50E02D24500F03B52</string>
+ <string>F56524C60E02D24500F03B52</string>
+ <string>F56524C70E02D24500F03B52</string>
+ <string>F56524C80E02D24500F03B52</string>
+ <string>F56524C90E02D24500F03B52</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
@@ -738,13 +701,13 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>F5945E5A0E02B40100706420</string>
- <string>F5945E5B0E02B40100706420</string>
- <string>F5945E5C0E02B40100706420</string>
+ <string>F565251A0E02D68600F03B52</string>
+ <string>F565251B0E02D68600F03B52</string>
+ <string>F565251C0E02D68600F03B52</string>
<string>/Users/pieter/projects/Cocoa/GitTest/GitTest.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>527 151 1163 815 0 0 1680 1028 </string>
+ <string>458 139 1168 889 0 0 1680 1028 </string>
<key>WindowToolsV3</key>
<array>
<dict>
View
12 GitTest.xcodeproj/project.pbxproj
@@ -13,6 +13,8 @@
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+ F56524BB0E02D22D00F03B52 /* NSFileHandleExt.m in Sources */ = {isa = PBXBuildFile; fileRef = F56524B90E02D22D00F03B52 /* NSFileHandleExt.m */; };
+ F56524F00E02D45200F03B52 /* PBGitCommit.m in Sources */ = {isa = PBXBuildFile; fileRef = F56524EF0E02D45200F03B52 /* PBGitCommit.m */; };
F5945E170E02B0C200706420 /* PBGitRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = F5945E160E02B0C200706420 /* PBGitRepository.m */; };
/* End PBXBuildFile section */
@@ -30,6 +32,10 @@
77C8280C06725ACE000B614F /* GitTest_AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitTest_AppDelegate.m; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* GitTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GitTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ F56524B90E02D22D00F03B52 /* NSFileHandleExt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSFileHandleExt.m; sourceTree = "<group>"; };
+ F56524BA0E02D22D00F03B52 /* NSFileHandleExt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSFileHandleExt.h; sourceTree = "<group>"; };
+ F56524EE0E02D45200F03B52 /* PBGitCommit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitCommit.h; sourceTree = "<group>"; };
+ F56524EF0E02D45200F03B52 /* PBGitCommit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitCommit.m; sourceTree = "<group>"; };
F5945E150E02B0C200706420 /* PBGitRepository.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRepository.h; sourceTree = "<group>"; };
F5945E160E02B0C200706420 /* PBGitRepository.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRepository.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -49,10 +55,14 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
+ F56524B90E02D22D00F03B52 /* NSFileHandleExt.m */,
+ F56524BA0E02D22D00F03B52 /* NSFileHandleExt.h */,
77C8280B06725ACE000B614F /* GitTest_AppDelegate.h */,
77C8280C06725ACE000B614F /* GitTest_AppDelegate.m */,
F5945E150E02B0C200706420 /* PBGitRepository.h */,
F5945E160E02B0C200706420 /* PBGitRepository.m */,
+ F56524EE0E02D45200F03B52 /* PBGitCommit.h */,
+ F56524EF0E02D45200F03B52 /* PBGitCommit.m */,
);
name = Classes;
sourceTree = "<group>";
@@ -191,6 +201,8 @@
77C8280E06725ACE000B614F /* GitTest_AppDelegate.m in Sources */,
770B37ED0679A11B001EADE2 /* GitTest_DataModel.xcdatamodel in Sources */,
F5945E170E02B0C200706420 /* PBGitRepository.m in Sources */,
+ F56524BB0E02D22D00F03B52 /* NSFileHandleExt.m in Sources */,
+ F56524F00E02D45200F03B52 /* PBGitCommit.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
1 GitTest_AppDelegate.m
@@ -22,7 +22,6 @@ - (GitTest_AppDelegate*) init
{
self.repository = [PBGitRepository repositoryWithPath:@"/Users/Pieter/projects/bonnenteller/.git"];
NSLog(@"Repository is: %@", repository);
- NSLog(@"Repository commits is: %@", repository.commits);
return self;
}
View
20 NSFileHandleExt.h
@@ -0,0 +1,20 @@
+/*
+ * Extension for NSFileHandle to make it capable of easy network programming
+ *
+ * Version 1.0, get the newest from http://michael.stapelberg.de/NSFileHandleExt.php
+ *
+ * Copyright 2007 Michael Stapelberg
+ *
+ * Distributed under BSD-License, see http://michael.stapelberg.de/BSD.php
+ *
+ */
+
+#import <Cocoa/Cocoa.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <fcntl.h>
+
+@interface NSFileHandle(NSFileHandleExt)
+-(NSString*)readLine;
+@end
View
62 NSFileHandleExt.m
@@ -0,0 +1,62 @@
+/*
+ * Extension for NSFileHandle to make it capable of easy network programming
+ *
+ * Version 1.0, get the newest from http://michael.stapelberg.de/NSFileHandleExt.php
+ *
+ * Copyright 2007 Michael Stapelberg
+ *
+ * Distributed under BSD-License, see http://michael.stapelberg.de/BSD.php
+ *
+ */
+
+
+#define CONN_TIMEOUT 5
+#define BUFFER_SIZE 256
+
+@implementation NSFileHandle(NSFileHandleExt)
+
+-(NSString*)readLine {
+ // If the socket is closed, return an empty string
+ if ([self fileDescriptor] <= 0)
+ return @"";
+
+ int fd = [self fileDescriptor];
+
+ // Allocate BUFFER_SIZE bytes to store the line
+ int bufferSize = BUFFER_SIZE;
+ char *buffer = (char*)malloc(bufferSize + 1);
+ if (buffer == NULL)
+ [[NSException exceptionWithName:@"No memory left" reason:@"No more memory for allocating buffer" userInfo:nil] raise];
+
+ int bytesReceived = 0, n = 1;
+
+ while (n > 0) {
+ n = read(fd, buffer + bytesReceived++, 1);
+
+ if (n < 0)
+ [[NSException exceptionWithName:@"Socket error" reason:@"Remote host closed connection" userInfo:nil] raise];
+
+ if (bytesReceived >= bufferSize) {
+ // Make buffer bigger
+ bufferSize += BUFFER_SIZE;
+ buffer = (char*)realloc(buffer, bufferSize + 1);
+ if (buffer == NULL)
+ [[NSException exceptionWithName:@"No memory left" reason:@"No more memory for allocating buffer" userInfo:nil] raise];
+ }
+
+ switch (*(buffer + bytesReceived - 1)) {
+ case '\n':
+ buffer[bytesReceived-1] = '\0';
+ return [NSString stringWithCString: buffer];
+ case '\r':
+ bytesReceived--;
+ }
+ }
+
+ buffer[bytesReceived-1] = '\0';
+ NSString *retVal = [NSString stringWithCString: buffer];
+ free(buffer);
+ return retVal;
+}
+
+@end
View
25 PBGitCommit.h
@@ -0,0 +1,25 @@
+//
+// PBGitCommit.h
+// GitTest
+//
+// Created by Pieter de Bie on 13-06-08.
+// Copyright 2008 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+#import "PBGitRepository.h"
+
+@interface PBGitCommit : NSObject {
+ NSString* sha;
+ NSString* subject;
+ PBGitRepository* repository;
+}
+
+- initWithRepository:(PBGitRepository*) repo andSha:(NSString*) sha;
+
+@property (copy) NSString* sha;
+@property (copy) NSString* subject;
+@property (readonly) NSString* details;
+
+@property (retain) PBGitRepository* repository;
+@end
View
29 PBGitCommit.m
@@ -0,0 +1,29 @@
+//
+// PBGitCommit.m
+// GitTest
+//
+// Created by Pieter de Bie on 13-06-08.
+// Copyright 2008 __MyCompanyName__. All rights reserved.
+//
+
+#import "PBGitCommit.h"
+
+
+@implementation PBGitCommit
+
+@synthesize sha, repository, subject;
+
+- initWithRepository:(PBGitRepository*) repo andSha:(NSString*) newSha
+{
+ self.repository = repo;
+ self.sha = newSha;
+ return self;
+}
+
+- (NSString*) details
+{
+ NSFileHandle* handle = [self.repository handleForCommand:[@"show " stringByAppendingString:self.sha]];
+ NSString* details = [[NSString alloc] initWithData:[handle readDataToEndOfFile] encoding: NSASCIIStringEncoding];
+ return details;
+}
+@end
View
1 PBGitRepository.h
@@ -8,7 +8,6 @@
#import <Cocoa/Cocoa.h>
-
@interface PBGitRepository : NSObject {
NSString* path;
NSArray* commits;
View
34 PBGitRepository.m
@@ -7,7 +7,9 @@
//
#import "PBGitRepository.h"
+#import "PBGitCommit.h"
+#import "NSFileHandleExt.h"
@implementation PBGitRepository
@@ -32,33 +34,21 @@ - (void) setCommits:(NSArray*) obj
- (NSArray*) commits
{
- NSLog(@"Hey");
if (commits != nil)
return commits;
- NSFileHandle* handle = [self handleForCommand:@"rev-list HEAD"];
-
- int buffersize = 50;
- char buffer[buffersize];
+ NSFileHandle* handle = [self handleForCommand:@"log --pretty=format:%H%x01%s HEAD"];
NSMutableArray * newArray = [NSMutableArray array];
- int fd = [handle fileDescriptor];
- FILE * file = fdopen(fd, "r");
-
- while (YES) {
-
-
- if (fgets(buffer, buffersize, file)) {
- NSString* s = [NSString stringWithCString:buffer length:buffersize];
- NSLog(@"Got string: %@", s);
- [newArray addObject:s];
- }
- else {
- fclose(file);
- NSLog(@"Done!");
- break;
- }
+ NSString* currentLine = [handle readLine];
+
+ while (currentLine.length > 0) {
+ NSArray* components = [currentLine componentsSeparatedByString:@"\01"];
+ PBGitCommit* newCommit = [[PBGitCommit alloc] initWithRepository: self andSha: [components objectAtIndex:0]];
+ newCommit.subject = [components objectAtIndex:1];
+ [newArray addObject: newCommit];
+ currentLine = [handle readLine];
}
-
+
commits = newArray;
return commits;
}

0 comments on commit b752f5b

Please sign in to comment.