├── .gitignore ├── CocoaGit.xcodeproj ├── TemplateIcon.icns └── project.pbxproj ├── Frameworks └── GHUnit.framework │ ├── GHUnit │ ├── Headers │ ├── Resources │ └── Versions │ ├── A │ ├── GHUnit │ ├── Headers │ │ ├── GHAsyncTestCase.h │ │ ├── GHMockNSHTTPURLResponse.h │ │ ├── GHMockNSURLConnection.h │ │ ├── GHNSObject+Invocation.h │ │ ├── GHTest.h │ │ ├── GHTestApp.h │ │ ├── GHTestAppDelegate.h │ │ ├── GHTestCase.h │ │ ├── GHTestGroup.h │ │ ├── GHTestMacros.h │ │ ├── GHTestRunner.h │ │ ├── GHTestSuite.h │ │ ├── GHTestViewController.h │ │ ├── GHTestViewModel.h │ │ ├── GHTestWindowController.h │ │ ├── GHTesting.h │ │ └── GHUnit.h │ └── Resources │ │ ├── English.lproj │ │ └── InfoPlist.strings │ │ ├── GHTestApp.nib │ │ ├── GHTestView.nib │ │ ├── GHTestWindow.nib │ │ └── Info.plist │ └── Current ├── Git.h ├── Git_Prefix.pch ├── LICENCE ├── Nu ├── .gitignore ├── Nukefile ├── Source ├── git-fetch.nu ├── git-pack-inspect.nu ├── rev-walk.nu └── set-diff.nu ├── README.md ├── Resources ├── CocoaGit.dox ├── English.lproj │ ├── InfoPlist.strings │ └── Localizable.strings ├── Info.plist └── doxygen.config ├── Ruby ├── .gitignore ├── README.txt ├── Rakefile ├── lib │ ├── cocoagit.rb │ └── cocoagit │ │ └── extensions │ │ ├── cocoagit.rb │ │ └── macruby.rb └── test │ ├── helper.rb │ ├── suite.rb │ ├── test_commit.rb │ ├── test_file_store.rb │ ├── test_pack_file_v2.rb │ ├── test_pack_index_v2.rb │ ├── test_pack_store.rb │ ├── test_repo.rb │ └── test_tree.rb ├── Source ├── Categories │ ├── NSCharacterSet+StringComparison.h │ ├── NSCharacterSet+StringComparison.m │ ├── NSData+Compression.h │ ├── NSData+Compression.m │ ├── NSData+Hashing.h │ ├── NSData+Hashing.m │ ├── NSData+HexDump.h │ ├── NSData+HexDump.m │ ├── NSData+Patching.h │ ├── NSData+Patching.m │ ├── NSData+Searching.h │ ├── NSData+Searching.m │ ├── NSError-OBExtensions.h │ ├── NSError-OBExtensions.m │ ├── NSFileManager+DirHelper.h │ ├── NSFileManager+DirHelper.m │ ├── NSTimeZone+Offset.h │ └── NSTimeZone+Offset.m ├── GITErrors.h ├── GITErrors.m ├── GITRepo.h ├── GITRepo.m ├── GITUtilityBelt.h ├── GITUtilityBelt.m ├── Graph │ ├── GITCommitEnumerator.h │ ├── GITCommitEnumerator.m │ ├── GITGraph.h │ ├── GITGraph.m │ ├── GITNode.h │ ├── GITNode.m │ ├── GITRepo+Enumerators.h │ └── GITRepo+Enumerators.m ├── Network │ ├── GITClient.h │ ├── GITClient.m │ ├── GITFetchProcess.h │ ├── GITFetchProcess.m │ ├── GITServer.h │ ├── GITServer.m │ ├── GITServerHandler.h │ ├── GITServerHandler.m │ ├── GITSshTransport.h │ ├── GITSshTransport.m │ ├── GITTransport.h │ └── GITTransport.m ├── Packs │ ├── File │ │ ├── GITPackFile.h │ │ ├── GITPackFile.m │ │ ├── GITPackFileVersion2.h │ │ ├── GITPackFileVersion2.m │ │ ├── GITPlaceholderPackFile.h │ │ └── GITPlaceholderPackFile.m │ └── Index │ │ ├── GITPackIndex.h │ │ ├── GITPackIndex.m │ │ ├── GITPackIndexVersion1.h │ │ ├── GITPackIndexVersion1.m │ │ ├── GITPackIndexVersion2.h │ │ ├── GITPackIndexVersion2.m │ │ ├── GITPackReverseIndex.h │ │ ├── GITPackReverseIndex.m │ │ ├── GITPlaceholderPackIndex.h │ │ └── GITPlaceholderPackIndex.m ├── Refs │ ├── GITBranch.h │ ├── GITBranch.m │ ├── GITRef.h │ └── GITRef.m ├── Stores │ ├── GITCombinedStore.h │ ├── GITCombinedStore.m │ ├── GITFileStore.h │ ├── GITFileStore.m │ ├── GITObjectStore.h │ ├── GITObjectStore.m │ ├── GITPackStore.h │ ├── GITPackStore.m │ ├── GITRefStore.h │ └── GITRefStore.m ├── Tools │ ├── git-inspect.m │ ├── git-pack-inspect.m │ ├── git-remote.m │ ├── git-rev-list.m │ └── git-server.m ├── Types │ ├── GITBlob.h │ ├── GITBlob.m │ ├── GITCommit.h │ ├── GITCommit.m │ ├── GITObject+Parsing.h │ ├── GITObject+Parsing.m │ ├── GITObject.h │ ├── GITObject.m │ ├── GITTag.h │ ├── GITTag.m │ ├── GITTree.h │ ├── GITTree.m │ ├── GITTreeEntry.h │ └── GITTreeEntry.m ├── Utils │ ├── GITActor.h │ ├── GITActor.m │ ├── GITDateTime.h │ ├── GITDateTime.m │ ├── SSHChannel.h │ ├── SSHChannel.m │ ├── SSHConnection.h │ ├── SSHConnection.m │ ├── SSHConnectionTest.m │ ├── SSHError.h │ ├── SSHError.m │ ├── SSHSession.h │ └── SSHSession.m ├── Vendor │ ├── SmallSockets │ │ ├── AbstractSocket.h │ │ ├── AbstractSocket.m │ │ ├── BufferedSocket.h │ │ ├── BufferedSocket.m │ │ ├── MutableDataBufferExtension.h │ │ ├── MutableDataBufferExtension.m │ │ ├── Socket.h │ │ └── Socket.m │ └── TCPServer │ │ ├── TCPServer.h │ │ └── TCPServer.m ├── assertions.h ├── assertions.m └── libssh2 │ ├── include │ ├── libssh2.h │ ├── libssh2_config.h │ ├── libssh2_priv.h │ ├── libssh2_publickey.h │ ├── libssh2_sftp.h │ └── openssl.h │ └── src │ ├── channel.c │ ├── comp.c │ ├── crypt.c │ ├── hostkey.c │ ├── kex.c │ ├── mac.c │ ├── misc.c │ ├── openssl.c │ ├── packet.c │ ├── pem.c │ ├── publickey.c │ ├── scp.c │ ├── session.c │ ├── sftp.c │ ├── transport.c │ └── userauth.c ├── UnitTests-Info.plist └── UnitTests ├── Resources ├── Info.plist ├── README.txt ├── dot_git │ ├── HEAD │ ├── config │ ├── description │ ├── hooks │ │ ├── applypatch-msg │ │ ├── commit-msg │ │ ├── post-commit │ │ ├── post-receive │ │ ├── post-update │ │ ├── pre-applypatch │ │ ├── pre-commit │ │ ├── pre-rebase │ │ ├── prepare-commit-msg │ │ └── update │ ├── info │ │ └── exclude │ ├── objects │ │ ├── 10 │ │ │ ├── 3f361dd2c9df04c07cd1135433378852a44e32 │ │ │ └── e19ae4b43d07b757beee214eeadcaad2502562 │ │ ├── 11 │ │ │ └── 49d003e24c0794751ba34cbbca6dc562dfdf9b │ │ ├── 12 │ │ │ └── e183104e82db8cc7fd3b17a69aec46fb1d9487 │ │ ├── 22 │ │ │ ├── 6e91f3b4cca13890325f5d33ec050beca99f89 │ │ │ └── fe0f5e3f062c500c1b2076acef7fed43a32084 │ │ ├── 24 │ │ │ ├── e8a3b08ebe2162aa90bbb7702a3c5189335dc6 │ │ │ └── f1a3f184cada0b9f4f389d482061975dc0c23c │ │ ├── 25 │ │ │ └── 793ba675da6ef31eb6aa43328467dd8db2a3bf │ │ ├── 28 │ │ │ └── 5c37cc39a59bf80140f7e488cfc10e01ab02c6 │ │ ├── 31 │ │ │ └── 35253e5dd7ab4fc53e72bb1192887c3e437574 │ │ ├── 34 │ │ │ └── d90f9fea9734ebea38a3349713de9c7ddc9102 │ │ ├── 36 │ │ │ └── bc27f9730d6e142251537ce8f00f00916c4510 │ │ ├── 41 │ │ │ ├── 0f428a7effbe61254b5b36611d37aac160736b │ │ │ └── e234c127cac1b154ba070c208b4f7bf390a744 │ │ ├── 45 │ │ │ └── f55f811d43dd9a1358458034d4400a408c711c │ │ ├── 55 │ │ │ └── 43323c6b02f4fb30940f780c4431d32829e76b │ │ ├── 65 │ │ │ └── 6af6710f7e2420bd2530d1c53822d1458646a2 │ │ ├── 74 │ │ │ └── 5420bbf194392f22694e68f7cdd41234c35f4e │ │ ├── 78 │ │ │ └── d245f1a50bfd53821f70bf211d252fe9884d86 │ │ ├── 86 │ │ │ └── 0204d1ca9f7e50ba9949aa76117895b5b1a136 │ │ ├── 87 │ │ │ └── f974580d485f3cfd5fd9cc62491341067f0c59 │ │ ├── 90 │ │ │ └── 74e33cdc6bf858efb14922770e75f4a3eb5628 │ │ ├── 04 │ │ │ └── f612c594705792ee5c9cb6770cb926f820745e │ │ ├── 06 │ │ │ └── a42c6a5c76120e9adc7d5efd79d9c9eaef936f │ │ ├── 08 │ │ │ └── 714c9842200451c582ab035ec16c16fffaf908 │ │ ├── 0d │ │ │ └── 7696b4c809b22949fac121f0db427dc6099ce5 │ │ ├── 1b │ │ │ ├── 06b417010400c92a4d9b840f136315fd83430e │ │ │ └── 91aa304c105a96746a7ffa267ac82e99480dd0 │ │ ├── 1d │ │ │ └── ba503f40006d1d89552b4dc8a25dc1a6a4e013 │ │ ├── 1e │ │ │ └── fdc251e26c6d408d7df8ebbc953a228c79afa1 │ │ ├── 2b │ │ │ └── b318d2c722b344f6fae8ec274d0c7df9020544 │ │ ├── 3c │ │ │ └── a188481c60fe3f0a1a60f500a26710a5961593 │ │ ├── 5b │ │ │ └── e456aea74a055c376a271e14c14f60d97cb68c │ │ ├── 6c │ │ │ └── be32dc1cfd3ca776760c8c862006319460e271 │ │ ├── 7a │ │ │ └── fb4770045be464c04b3a6f9cf2dd4e6432a6b7 │ │ ├── 7c │ │ │ └── 60eee9a2238b1de8a1bdfe7e607e72a00fba4d │ │ ├── 7d │ │ │ └── 68b1f916cfc73c2771bd3282a4f913f767bae2 │ │ ├── 8c │ │ │ └── 2a16604844b7762fd6545339693cfe822cc75b │ │ ├── 8e │ │ │ └── 065cdc3e97c1d77a19d519d72e8e02010b1e83 │ │ ├── 8f │ │ │ └── 6c301d8bfe4c0cc3d8670955f82f872f39f5a3 │ │ ├── 9c │ │ │ └── 3e26256583d93113e272024e6711fd477429df │ │ ├── a0 │ │ │ └── 336d66110dbe7efd1845517e5a510a78d19db9 │ │ ├── a3 │ │ │ └── 672be369df28ba4d75141d8c3a10ee3fcabffa │ │ ├── a4 │ │ │ └── c0e695258d0ac4cbcbd33177d42dada3185623 │ │ ├── a7 │ │ │ └── 959d4a69d6771b26c9c2090ccadd35b81d5387 │ │ ├── a9 │ │ │ └── ecfd8989d7c427c5564cf918b264261866ce01 │ │ ├── ac │ │ │ └── 694533945c766d9d4e9ad36c3d15ad943b61db │ │ ├── b8 │ │ │ └── ea533af44f544877babe0aaabc1d7f3ed2593f │ │ ├── b9 │ │ │ └── 237bcb41c35873521545f3e0bbc825ea847d84 │ │ ├── c4 │ │ │ └── 316dabeac43115f00be867fd22426f54d5040f │ │ ├── c7 │ │ │ └── 83b29bcb9adefa70ed141aabf066f9f1c3beda │ │ ├── cd │ │ │ └── 1b673074ab3f84a354929a99d1cc6e1eb5ef53 │ │ ├── d1 │ │ │ └── 094a69e97b36db6ebf7142489d0a7402fdb124 │ │ ├── d4 │ │ │ └── a7449cb88ad9fe6f6ab334b3fd3f569a9f35a0 │ │ ├── d8 │ │ │ └── 094720229e2975cc639b028f56602baa6f8715 │ │ ├── dc │ │ │ └── 5c47bc4259f7d16e8625225a15d78ee90560c1 │ │ ├── e2 │ │ │ └── 52da6072a2f887a1f0165177ec068baf566d0e │ │ ├── e8 │ │ │ ├── c378f20149cd520f99d32b164f181e68dd6588 │ │ │ └── e796b690324f705757ea9c3f9a62e94e026257 │ │ ├── f3 │ │ │ └── fbea20d8078597678c4d451a57a182114387c6 │ │ ├── f7 │ │ │ └── e7e7d240ccdae143b064aa7467eb2fa91aa8a5 │ │ ├── f8 │ │ │ ├── 474afb42704352dcd37751c15ae68d7d21fbc2 │ │ │ └── 5a47c40f8de414905e93e907920e8c16f6e572 │ │ ├── info │ │ │ └── packs │ │ └── pack │ │ │ ├── pack-709b858145841a007ab0c53e130630fd1eecea6f.idx │ │ │ └── pack-709b858145841a007ab0c53e130630fd1eecea6f.pack │ └── refs │ │ └── heads │ │ ├── branch1 │ │ ├── branch2 │ │ ├── branch3 │ │ ├── master │ │ ├── revwalk │ │ ├── revwalk-test │ │ └── ruby ├── dot_git_refs │ ├── FETCH_HEAD │ ├── HEAD │ ├── config │ ├── description │ ├── hooks │ │ ├── applypatch-msg │ │ ├── commit-msg │ │ ├── post-commit │ │ ├── post-receive │ │ ├── post-update │ │ ├── pre-applypatch │ │ ├── pre-commit │ │ ├── pre-rebase │ │ ├── prepare-commit-msg │ │ └── update │ ├── index │ ├── info │ │ └── exclude │ ├── logs │ │ ├── HEAD │ │ └── refs │ │ │ ├── heads │ │ │ ├── facepalm │ │ │ ├── geoffgarside │ │ │ │ ├── master │ │ │ │ └── nserror │ │ │ ├── ghunit │ │ │ ├── master │ │ │ ├── nu │ │ │ ├── oberror │ │ │ └── sshchannel │ │ │ └── remotes │ │ │ ├── geoffgarside │ │ │ ├── bottomup │ │ │ ├── git-server │ │ │ ├── macruby │ │ │ ├── master │ │ │ ├── nserror │ │ │ ├── oberror │ │ │ └── uncrustify │ │ │ └── github │ │ │ └── master │ ├── packed-refs │ └── refs │ │ ├── heads │ │ ├── facepalm │ │ ├── nu │ │ ├── oberror │ │ └── sshchannel │ │ ├── remotes │ │ └── github │ │ │ └── HEAD │ │ └── tags │ │ └── facepalm ├── fixtures │ ├── refFixtures.plist │ ├── refs2plist.nu │ ├── revListFixtures.plist │ └── revlist-fixtures.nu ├── packs │ ├── cg-0.2.5-deltaofs-be5a15ac583f7ed1e431f03bd444bbde6511e57c.idx │ ├── cg-0.2.5-deltaofs-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack │ ├── cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.idx │ ├── cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack │ ├── cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.v1.idx │ ├── pack-dump.nuke │ ├── pack-fixtures.nu │ └── packFixtures.plist └── test_repo │ ├── docs │ └── index.html │ ├── dot_git_dir │ ├── COMMIT_EDITMSG │ ├── HEAD │ ├── ORIG_HEAD │ ├── config │ ├── description │ ├── gitk.cache │ ├── hooks │ │ ├── applypatch-msg │ │ ├── commit-msg │ │ ├── post-commit │ │ ├── post-receive │ │ ├── post-update │ │ ├── pre-applypatch │ │ ├── pre-commit │ │ ├── pre-rebase │ │ ├── prepare-commit-msg │ │ └── update │ ├── index │ ├── info │ │ ├── exclude │ │ └── refs │ ├── logs │ │ ├── HEAD │ │ └── refs │ │ │ └── heads │ │ │ ├── branch1 │ │ │ ├── branch2 │ │ │ ├── branch3 │ │ │ ├── master │ │ │ ├── revwalk │ │ │ ├── revwalk-test │ │ │ └── ruby │ ├── objects │ │ ├── 10 │ │ │ ├── 3f361dd2c9df04c07cd1135433378852a44e32 │ │ │ └── e19ae4b43d07b757beee214eeadcaad2502562 │ │ ├── 11 │ │ │ └── 49d003e24c0794751ba34cbbca6dc562dfdf9b │ │ ├── 12 │ │ │ └── e183104e82db8cc7fd3b17a69aec46fb1d9487 │ │ ├── 22 │ │ │ ├── 6e91f3b4cca13890325f5d33ec050beca99f89 │ │ │ └── fe0f5e3f062c500c1b2076acef7fed43a32084 │ │ ├── 24 │ │ │ ├── e8a3b08ebe2162aa90bbb7702a3c5189335dc6 │ │ │ └── f1a3f184cada0b9f4f389d482061975dc0c23c │ │ ├── 25 │ │ │ └── 793ba675da6ef31eb6aa43328467dd8db2a3bf │ │ ├── 28 │ │ │ └── 5c37cc39a59bf80140f7e488cfc10e01ab02c6 │ │ ├── 31 │ │ │ └── 35253e5dd7ab4fc53e72bb1192887c3e437574 │ │ ├── 34 │ │ │ └── d90f9fea9734ebea38a3349713de9c7ddc9102 │ │ ├── 36 │ │ │ └── bc27f9730d6e142251537ce8f00f00916c4510 │ │ ├── 41 │ │ │ ├── 0f428a7effbe61254b5b36611d37aac160736b │ │ │ └── e234c127cac1b154ba070c208b4f7bf390a744 │ │ ├── 45 │ │ │ └── f55f811d43dd9a1358458034d4400a408c711c │ │ ├── 55 │ │ │ └── 43323c6b02f4fb30940f780c4431d32829e76b │ │ ├── 65 │ │ │ └── 6af6710f7e2420bd2530d1c53822d1458646a2 │ │ ├── 74 │ │ │ └── 5420bbf194392f22694e68f7cdd41234c35f4e │ │ ├── 78 │ │ │ └── d245f1a50bfd53821f70bf211d252fe9884d86 │ │ ├── 86 │ │ │ └── 0204d1ca9f7e50ba9949aa76117895b5b1a136 │ │ ├── 87 │ │ │ └── f974580d485f3cfd5fd9cc62491341067f0c59 │ │ ├── 90 │ │ │ └── 74e33cdc6bf858efb14922770e75f4a3eb5628 │ │ ├── 04 │ │ │ └── f612c594705792ee5c9cb6770cb926f820745e │ │ ├── 06 │ │ │ └── a42c6a5c76120e9adc7d5efd79d9c9eaef936f │ │ ├── 08 │ │ │ └── 714c9842200451c582ab035ec16c16fffaf908 │ │ ├── 0d │ │ │ └── 7696b4c809b22949fac121f0db427dc6099ce5 │ │ ├── 1b │ │ │ ├── 06b417010400c92a4d9b840f136315fd83430e │ │ │ └── 91aa304c105a96746a7ffa267ac82e99480dd0 │ │ ├── 1d │ │ │ └── ba503f40006d1d89552b4dc8a25dc1a6a4e013 │ │ ├── 1e │ │ │ └── fdc251e26c6d408d7df8ebbc953a228c79afa1 │ │ ├── 2b │ │ │ └── b318d2c722b344f6fae8ec274d0c7df9020544 │ │ ├── 3c │ │ │ └── a188481c60fe3f0a1a60f500a26710a5961593 │ │ ├── 5b │ │ │ └── e456aea74a055c376a271e14c14f60d97cb68c │ │ ├── 6c │ │ │ └── be32dc1cfd3ca776760c8c862006319460e271 │ │ ├── 7a │ │ │ └── fb4770045be464c04b3a6f9cf2dd4e6432a6b7 │ │ ├── 7c │ │ │ └── 60eee9a2238b1de8a1bdfe7e607e72a00fba4d │ │ ├── 7d │ │ │ └── 68b1f916cfc73c2771bd3282a4f913f767bae2 │ │ ├── 8c │ │ │ └── 2a16604844b7762fd6545339693cfe822cc75b │ │ ├── 8e │ │ │ └── 065cdc3e97c1d77a19d519d72e8e02010b1e83 │ │ ├── 8f │ │ │ └── 6c301d8bfe4c0cc3d8670955f82f872f39f5a3 │ │ ├── 9c │ │ │ └── 3e26256583d93113e272024e6711fd477429df │ │ ├── a0 │ │ │ └── 336d66110dbe7efd1845517e5a510a78d19db9 │ │ ├── a3 │ │ │ └── 672be369df28ba4d75141d8c3a10ee3fcabffa │ │ ├── a4 │ │ │ └── c0e695258d0ac4cbcbd33177d42dada3185623 │ │ ├── a7 │ │ │ └── 959d4a69d6771b26c9c2090ccadd35b81d5387 │ │ ├── a9 │ │ │ └── ecfd8989d7c427c5564cf918b264261866ce01 │ │ ├── ac │ │ │ └── 694533945c766d9d4e9ad36c3d15ad943b61db │ │ ├── b8 │ │ │ └── ea533af44f544877babe0aaabc1d7f3ed2593f │ │ ├── b9 │ │ │ └── 237bcb41c35873521545f3e0bbc825ea847d84 │ │ ├── c4 │ │ │ └── 316dabeac43115f00be867fd22426f54d5040f │ │ ├── c7 │ │ │ └── 83b29bcb9adefa70ed141aabf066f9f1c3beda │ │ ├── cd │ │ │ └── 1b673074ab3f84a354929a99d1cc6e1eb5ef53 │ │ ├── d1 │ │ │ └── 094a69e97b36db6ebf7142489d0a7402fdb124 │ │ ├── d4 │ │ │ └── a7449cb88ad9fe6f6ab334b3fd3f569a9f35a0 │ │ ├── d8 │ │ │ └── 094720229e2975cc639b028f56602baa6f8715 │ │ ├── dc │ │ │ └── 5c47bc4259f7d16e8625225a15d78ee90560c1 │ │ ├── e2 │ │ │ └── 52da6072a2f887a1f0165177ec068baf566d0e │ │ ├── e8 │ │ │ ├── c378f20149cd520f99d32b164f181e68dd6588 │ │ │ └── e796b690324f705757ea9c3f9a62e94e026257 │ │ ├── f3 │ │ │ └── fbea20d8078597678c4d451a57a182114387c6 │ │ ├── f7 │ │ │ └── e7e7d240ccdae143b064aa7467eb2fa91aa8a5 │ │ ├── f8 │ │ │ ├── 474afb42704352dcd37751c15ae68d7d21fbc2 │ │ │ └── 5a47c40f8de414905e93e907920e8c16f6e572 │ │ ├── info │ │ │ └── packs │ │ └── pack │ │ │ ├── pack-709b858145841a007ab0c53e130630fd1eecea6f.idx │ │ │ └── pack-709b858145841a007ab0c53e130630fd1eecea6f.pack │ └── refs │ │ └── heads │ │ ├── branch1 │ │ ├── branch2 │ │ ├── branch3 │ │ ├── master │ │ ├── revwalk │ │ ├── revwalk-test │ │ └── ruby │ └── hello.rb └── Source ├── GHUnitTestMain.m ├── GITActorTests.h ├── GITActorTests.m ├── GITBlobTests.h ├── GITBlobTests.m ├── GITCombinedStoreTests.h ├── GITCombinedStoreTests.m ├── GITCommitTests.h ├── GITCommitTests.m ├── GITDateTimeTests.h ├── GITDateTimeTests.m ├── GITFileStoreTests.h ├── GITFileStoreTests.m ├── GITGraphTests.h ├── GITGraphTests.m ├── GITPackFileTests.h ├── GITPackFileTests.m ├── GITPackIndexTests.h ├── GITPackIndexTests.m ├── GITPackStoreTests.h ├── GITPackStoreTests.m ├── GITRefStoreTests.h ├── GITRefStoreTests.m ├── GITRepoTests.h ├── GITRepoTests.m ├── GITTestHelper.h ├── GITTestHelper.m ├── GITTreeEntryTests.h ├── GITTreeEntryTests.m ├── GITTreeTests.h ├── GITTreeTests.m ├── GITUtilityBeltTests.h └── GITUtilityBeltTests.m /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.xcodeproj/*.pbxuser 3 | *.xcodeproj/*.mode1v3 4 | *.xcodeproj/*.perspectivev3 5 | ._* 6 | Git.framework 7 | build 8 | Docs 9 | -------------------------------------------------------------------------------- /CocoaGit.xcodeproj/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/CocoaGit.xcodeproj/TemplateIcon.icns -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/GHUnit: -------------------------------------------------------------------------------- 1 | Versions/Current/GHUnit -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/GHUnit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/Frameworks/GHUnit.framework/Versions/A/GHUnit -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/Headers/GHMockNSHTTPURLResponse.h: -------------------------------------------------------------------------------- 1 | // 2 | // GHMockNSHTTPURLResponse.h 3 | // GHUnit 4 | // 5 | // Created by Gabriel Handford on 4/9/09. 6 | // Copyright 2009. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import 31 | 32 | 33 | // The NSHTTPURLResponse doesn't have a way to set the status code or headers, 34 | // so we'll subclass and add setters for the statusCode and allHeaderFields properties. 35 | @interface GHMockNSHTTPURLResponse : NSHTTPURLResponse { 36 | NSInteger statusCode_; 37 | NSDictionary *headers_; 38 | } 39 | 40 | - (id)initWithStatusCode:(NSInteger)statusCode headers:(NSDictionary *)headers; 41 | 42 | - (void)setStatusCode:(int)code; 43 | - (void)setHeaders:(NSDictionary *)headers; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/Headers/GHTestApp.h: -------------------------------------------------------------------------------- 1 | // 2 | // GHTestApp.h 3 | // GHUnit 4 | // 5 | // Created by Gabriel Handford on 1/20/09. 6 | // Copyright 2009. All rights reserved. 7 | // 8 | 9 | @interface GHTestApp : NSObject { 10 | NSMutableArray *topLevelObjects_; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/Headers/GHTestAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GHTestAppDelegate.h 3 | // 4 | // Created by Gabriel Handford on 11/28/08. 5 | // Copyright 2008. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person 8 | // obtaining a copy of this software and associated documentation 9 | // files (the "Software"), to deal in the Software without 10 | // restriction, including without limitation the rights to use, 11 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the 13 | // Software is furnished to do so, subject to the following 14 | // conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be 17 | // included in all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | // OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | 29 | #import "GHTestAppDelegate.h" 30 | #import "GHTestWindowController.h" 31 | #import "GHTestRunner.h" 32 | 33 | @interface GHTestAppDelegate : NSObject { 34 | GHTestWindowController *windowController_; 35 | } 36 | 37 | - (void)runTests; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/Headers/GHTestWindowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GHTestWindowController.h 3 | // GHKit 4 | // 5 | // Created by Gabriel Handford on 1/17/09. 6 | // Copyright 2009. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "GHTestViewController.h" 31 | 32 | @interface GHTestWindowController : NSWindowController { 33 | GHTestViewController *viewController_; 34 | } 35 | 36 | @property (retain, nonatomic) IBOutlet GHTestViewController *viewController; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/Headers/GHUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // GHUnit.h 3 | // GHUnit 4 | // 5 | // Created by Gabriel Handford on 1/19/09. 6 | // Copyright 2009. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "GHTestCase.h" 31 | #import "GHAsyncTestCase.h" 32 | #import "GHTestSuite.h" 33 | #import "GHTestMacros.h" 34 | #import "GHTestRunner.h" 35 | 36 | #import "GHMockNSURLConnection.h" 37 | #import "GHMockNSHTTPURLResponse.h" 38 | -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/Frameworks/GHUnit.framework/Versions/A/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/Resources/GHTestApp.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/Frameworks/GHUnit.framework/Versions/A/Resources/GHTestApp.nib -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/Resources/GHTestView.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/Frameworks/GHUnit.framework/Versions/A/Resources/GHTestView.nib -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/Resources/GHTestWindow.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/Frameworks/GHUnit.framework/Versions/A/Resources/GHTestWindow.nib -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | GHUnit 9 | CFBundleIdentifier 10 | me.rel.GHUnit 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | GHUnit 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleSignature 18 | GABE 19 | CFBundleVersion 20 | 0.3.5 21 | 22 | 23 | -------------------------------------------------------------------------------- /Frameworks/GHUnit.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /Git.h: -------------------------------------------------------------------------------- 1 | // 2 | // GIT.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 04/01/2009. 6 | // Copyright 2009 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // Main source files are in the Sources directory 12 | #import "GITErrors.h" 13 | 14 | #pragma mark Repo and object access 15 | #import "GITRepo.h" 16 | #pragma mark GIT Objects 17 | #import "GITObject.h" 18 | #import "GITCommit.h" 19 | #import "GITBlob.h" 20 | #import "GITTree.h" 21 | #import "GITTag.h" 22 | #pragma mark GIT Helper objects 23 | #import "GITRef.h" 24 | #import "GITTreeEntry.h" 25 | #import "GITDateTime.h" 26 | #import "GITActor.h" 27 | #pragma mark GIT Network objects 28 | #import "GITServer.h" 29 | #import "GITServerHandler.h" 30 | #import "GITClient.h" -------------------------------------------------------------------------------- /Git_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'CocoaGit' target in the 'CocoaGit' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008 Geoff Garside 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Nu/.gitignore: -------------------------------------------------------------------------------- 1 | *.pack 2 | *.idx 3 | -------------------------------------------------------------------------------- /Nu/Source: -------------------------------------------------------------------------------- 1 | ../Source -------------------------------------------------------------------------------- /Nu/git-pack-inspect.nu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nush 2 | 3 | ;; command-line input 4 | (set exit (NuBridgedFunction functionWithName:"exit" signature:"vi")) 5 | 6 | (set argv ((NSProcessInfo processInfo) arguments)) 7 | (set progName (argv 1)) 8 | (set packfileName (argv 2)) 9 | (set sha1 (argv 3)) 10 | 11 | (unless (eq 4 (argv count)) 12 | (puts "usage: #{progName} ") 13 | (exit 1)) 14 | 15 | (load "Git") 16 | 17 | (set packfile (GITPackFile packFileWithPath:packfileName)) 18 | (set packidx (packfile index)) 19 | 20 | (puts "pack version: #{(packfile version)}") 21 | (puts "index version: #{(packidx version)}") 22 | (puts "pack checksum: #{(packfile checksumString)}") 23 | (puts " idx checksum: #{(packidx checksumString)}") 24 | 25 | (set error (NuReference new)) 26 | (set objOffset (packidx packOffsetForSha1:sha1 error:error)) 27 | (if (error value) 28 | (puts ((error value) localizedDescription))) 29 | (puts "sha1: #{sha1}, offset: #{objOffset}") 30 | 31 | (set objData (packfile dataForObjectWithSha1:sha1)) 32 | (puts (objData hexdump)) 33 | (puts "obj size: #{(objData length)}") 34 | 35 | 36 | -------------------------------------------------------------------------------- /Nu/set-diff.nu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nush 2 | 3 | ; Tests 2 files to see whether they contain the same set of lines 4 | ; even if the order of the lines is different. 5 | 6 | ;; command-line input 7 | (set exit (NuBridgedFunction functionWithName:"exit" signature:"vi")) 8 | 9 | (set argv ((NSProcessInfo processInfo) arguments)) 10 | (set file1 (argv 2)) 11 | (set file2 (argv 3)) 12 | 13 | (set contents1 (NSString stringWithContentsOfFile:file1)) 14 | (set lines1 ((contents1 chomp) componentsSeparatedByCharactersInSet:(NSCharacterSet newlineCharacterSet))) 15 | (set contents2 (NSString stringWithContentsOfFile:file2)) 16 | (set lines2 ((contents2 chomp) componentsSeparatedByCharactersInSet:(NSCharacterSet newlineCharacterSet))) 17 | 18 | (set diffs (NSMutableSet new)) 19 | (lines1 each:(do (line) 20 | (unless (lines2 containsObject:line) 21 | (diffs addObject:line)))) 22 | 23 | (puts ("#{(diffs count)} lines differ")) 24 | ;(puts (diffs list)) 25 | -------------------------------------------------------------------------------- /Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Resources/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/Resources/English.lproj/Localizable.strings -------------------------------------------------------------------------------- /Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.manicpanda.${PRODUCT_NAME:identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /Ruby/.gitignore: -------------------------------------------------------------------------------- 1 | macruby-src/ 2 | macruby-build/ 3 | MacRuby.framework/ 4 | bin/ 5 | -------------------------------------------------------------------------------- /Ruby/lib/cocoagit.rb: -------------------------------------------------------------------------------- 1 | $:.unshift File.dirname(__FILE__) # For use/testing when no gem is installed 2 | 3 | unless defined? RUBY_ENGINE && RUBY_ENGINE == 'macruby' 4 | puts "You need to install MacRuby" 5 | exit 1 6 | end 7 | 8 | # load custom macruby extensions 9 | require 'cocoagit/extensions/macruby' 10 | 11 | # load frameworks 12 | framework 'Foundation' 13 | git_xcode = File.join(File.dirname(__FILE__), '..', '..', 'build', 'Debug-GC', 'Git.framework') 14 | framework git_xcode 15 | 16 | # load macruby extensions for cocoagit classes 17 | require 'cocoagit/extensions/cocoagit' 18 | -------------------------------------------------------------------------------- /Ruby/lib/cocoagit/extensions/cocoagit.rb: -------------------------------------------------------------------------------- 1 | # I can't figure out how to access the GITError constants 2 | # define them here for now 3 | module GITError 4 | ObjectSizeMismatch = -1 5 | ObjectNotFound = -2 6 | ObjectTypeMismatch = -3 7 | ObjectParsingFailed = -4 8 | 9 | FileNotFound = -5 10 | 11 | PackIndexUnsupportedVersion = -6 12 | PackStoreNotAccessible = -7 13 | PackFileInvalid = -8 14 | PackFileNotSupported = -9 15 | end 16 | 17 | # MacRuby does not define == in terms of NSObject#isEqual 18 | # Define == for the core GIT classes so that assert_equal 19 | # works properly 20 | class GITObject 21 | def ==(other) 22 | self.isEqualTo other 23 | end 24 | end 25 | 26 | # TODO: Replace this with an ObjC version that returns a dictionary. 27 | # We also need a method to return a list of parents. 28 | class GITCommit 29 | def to_hash 30 | { 31 | 'id' => sha1, 32 | 'parents' => { 'id' => parentSha1 }, # we don't support multiple parents yet 33 | 'tree' => tree.sha1, 34 | 'message' => message.strip, 35 | 'author' => { 36 | 'name' => author.name, 37 | 'email' => author.email 38 | }, 39 | 'committer' => { 40 | 'name' => committer.name, 41 | 'email' => committer.email 42 | }, 43 | 'authored_date' => authored.to_s, 44 | 'committed_date' => committed.to_s 45 | } 46 | end 47 | end 48 | 49 | class GITDateTime 50 | # return a string representation of the NSDate + Timezone info 51 | def to_s 52 | self.date.descriptionWithCalendarFormat "%a %b %d %H:%M:%S %Y %z", timeZone:self.timezone, locale:nil 53 | end 54 | end -------------------------------------------------------------------------------- /Ruby/lib/cocoagit/extensions/macruby.rb: -------------------------------------------------------------------------------- 1 | # Extensions to MacRuby 2 | # 3 | # Define some convenience methods for classes 4 | # with sharp edges 5 | 6 | # Check for macruby 7 | unless defined? RUBY_ENGINE && RUBY_ENGINE == 'macruby' 8 | puts "You need to install MacRuby" 9 | exit 1 10 | end 11 | 12 | # Monkey patch for MacRuby 0.3.0 release version: 13 | # String does not respond to :each, only :each_byte 14 | class String; alias :each :each_line; end 15 | 16 | class Pointer 17 | def self.ptr(type = :object) 18 | case type 19 | when :object 20 | new_with_type('@') 21 | when :int 22 | new_with_type('i') 23 | when :bool 24 | when :BOOL 25 | new_with_type('c') 26 | when :unsigned 27 | new_with_type('I') 28 | end 29 | end 30 | 31 | def value 32 | self[0] 33 | end 34 | end -------------------------------------------------------------------------------- /Ruby/test/helper.rb: -------------------------------------------------------------------------------- 1 | require File.join(File.dirname(__FILE__), *%w[.. lib cocoagit]) 2 | 3 | require 'rubygems' 4 | require 'test/unit' 5 | 6 | # Grit (v 0.9.4) is not working under macruby 7 | #require "mojombo-grit" 8 | 9 | COCOAGIT_RUBY = File.join(File.dirname(__FILE__), "..") 10 | COCOAGIT_REPO = File.join(COCOAGIT_RUBY, "..") 11 | 12 | # define locations for resources 13 | DOT_GIT = File.expand_path(File.join(COCOAGIT_REPO, *%w[UnitTests Resources dot_git])) -------------------------------------------------------------------------------- /Ruby/test/suite.rb: -------------------------------------------------------------------------------- 1 | require 'test/unit' 2 | 3 | tests = Dir["#{File.dirname(__FILE__)}/test_*.rb"] 4 | tests.each do |file| 5 | require file 6 | end -------------------------------------------------------------------------------- /Ruby/test/test_commit.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/helper' 2 | 3 | class TestCommit < Test::Unit::TestCase 4 | 5 | def setup 6 | @r = GITRepo.alloc.initWithRoot DOT_GIT, bare:true 7 | end 8 | 9 | def teardown 10 | @r = nil 11 | end 12 | 13 | def test_read_commit 14 | commit = @r.commitWithSha1 "f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5", error:nil 15 | assert commit 16 | expected = { 17 | "message"=>"removed bang, added goodbye message.", 18 | "parents"=>{"id"=>"2bb318d2c722b344f6fae8ec274d0c7df9020544"}, 19 | "authored_date"=>"Wed Oct 22 20:02:50 2008 -0700", 20 | "tree"=>"e252da6072a2f887a1f0165177ec068baf566d0e", 21 | "committer"=>{"name"=>"Brian Chapados ", "email"=>"chapados@sciencegeeks.org"}, 22 | "author"=>{"name"=>"Brian Chapados ", "email"=>"chapados@sciencegeeks.org"}, 23 | "id"=>"f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5", 24 | "committed_date"=>"Wed Oct 22 20:02:50 2008 -0700" 25 | } 26 | assert_equal expected, commit.to_hash 27 | end 28 | 29 | def test_unknown_object_error 30 | errorP = Pointer.ptr 31 | commit = @r.commitWithSha1 "0007e7d240ccdae143b064aa7467eb2fa91aa8a5", error:errorP 32 | assert_nil commit 33 | assert_equal GITError::ObjectNotFound, errorP.value.code 34 | end 35 | 36 | end -------------------------------------------------------------------------------- /Ruby/test/test_file_store.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/helper' 2 | 3 | class TestFileStore < Test::Unit::TestCase 4 | def setup 5 | @store = GITFileStore.alloc.initWithRoot DOT_GIT 6 | end 7 | 8 | def teardown 9 | @store = nil 10 | end 11 | 12 | def test_objects_dir 13 | assert_equal File.join(DOT_GIT, "objects"), @store.objectsDir 14 | end 15 | 16 | def test_path_for_object 17 | sha = "87f974580d485f3cfd5fd9cc62491341067f0c59" 18 | expected = File.join(DOT_GIT, "objects/87/f974580d485f3cfd5fd9cc62491341067f0c59") 19 | assert_equal expected, @store.stringWithPathToObject(sha) 20 | end 21 | 22 | def test_data_with_contents_of_object 23 | sha = "87f974580d485f3cfd5fd9cc62491341067f0c59" 24 | str = "blob 29\x00hello world!\n\ngoodbye world.\n" 25 | 26 | # BUG: There appears to a MacRuby bug in NSString#dataUsingEncoding 27 | # If the ruby string contains a null (\0 or \x00), then 28 | # The data object returned encodes a string full of spaces (\020) 29 | # instead of the actual string data. 30 | data = str.dataUsingEncoding NSUTF8StringEncoding 31 | store_data = @store.dataWithContentsOfObject(sha) 32 | store_str = NSString.alloc.initWithData store_data, encoding:NSUTF8StringEncoding 33 | # This next assertion fails... 34 | # assert_equal data, store_data 35 | 36 | # For now, just check that strings are the same! 37 | assert_equal str, store_str 38 | end 39 | 40 | def test_load_object_with_sha 41 | sha = "87f974580d485f3cfd5fd9cc62491341067f0c59" 42 | str = "hello world!\n\ngoodbye world.\n" 43 | 44 | data = str.dataUsingEncoding NSUTF8StringEncoding 45 | dataP = Pointer.ptr 46 | typeP = Pointer.ptr(:int) 47 | result = @store.loadObjectWithSha1 sha, intoData:dataP, type:typeP, error:nil 48 | 49 | assert result 50 | assert_equal 3, typeP.value 51 | assert data.isEqualTo dataP.value 52 | end 53 | end -------------------------------------------------------------------------------- /Ruby/test/test_pack_file_v2.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/helper' 2 | 3 | class TestPackFileV2 < Test::Unit::TestCase 4 | def setup 5 | @pack = GITPackFile.alloc.initWithPath File.join(DOT_GIT, "objects/pack/pack-709b858145841a007ab0c53e130630fd1eecea6f.pack") 6 | end 7 | 8 | def teardown 9 | @pack = nil 10 | end 11 | 12 | def test_version 13 | assert_equal 2, @pack.version 14 | end 15 | 16 | def test_object_count 17 | assert_equal 15, @pack.numberOfObjects 18 | end 19 | 20 | def test_has_object 21 | assert @pack.hasObjectWithSha1 "226e91f3b4cca13890325f5d33ec050beca99f89" 22 | end 23 | 24 | def test_checksum_string 25 | assert_equal "ac9654dde94bdb31dd50a50d20fe26c2c5cda925", @pack.checksumString 26 | end 27 | 28 | def test_verify_checksum 29 | assert @pack.verifyChecksum 30 | end 31 | 32 | def test_data_for_object 33 | sha = "226e91f3b4cca13890325f5d33ec050beca99f89" 34 | str = "#!/usr/bin/env ruby\n\nputs \"hello world!\"\n\nputs \"goodbye world.\"\n" 35 | data = str.dataUsingEncoding:NSUTF8StringEncoding 36 | 37 | assert data.isEqualTo @pack.dataForObjectWithSha1(sha) 38 | end 39 | end -------------------------------------------------------------------------------- /Ruby/test/test_pack_index_v2.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/helper' 2 | 3 | class TestPackIndexV2 < Test::Unit::TestCase 4 | def setup 5 | @index = GITPackIndex.alloc.initWithPath File.join(DOT_GIT, "objects/pack/pack-709b858145841a007ab0c53e130630fd1eecea6f.idx") 6 | end 7 | 8 | def teardown 9 | @index = nil 10 | end 11 | 12 | def test_version 13 | assert_equal 2, @index.version 14 | end 15 | 16 | def test_object_count 17 | assert_equal 15, @index.numberOfObjects 18 | end 19 | 20 | def test_object_offset 21 | assert_equal 1032, @index.packOffsetForSha1("226e91f3b4cca13890325f5d33ec050beca99f89") 22 | end 23 | 24 | def test_has_object 25 | assert @index.hasObjectWithSha1 "226e91f3b4cca13890325f5d33ec050beca99f89" 26 | end 27 | 28 | def test_checksum_string 29 | assert_equal "d9b99e4efbd35769156692b946511b028b3ede83", @index.checksumString 30 | end 31 | 32 | def test_pack_checksum_string 33 | assert_equal "ac9654dde94bdb31dd50a50d20fe26c2c5cda925", @index.packChecksumString 34 | end 35 | 36 | def test_verify_checksum 37 | assert @index.verifyChecksum 38 | end 39 | end -------------------------------------------------------------------------------- /Ruby/test/test_pack_store.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/helper' 2 | 3 | class TestPackStore < Test::Unit::TestCase 4 | def setup 5 | @store = GITPackStore.alloc.initWithRoot DOT_GIT 6 | end 7 | 8 | def teardown 9 | @store = nil 10 | end 11 | 12 | def test_pack_dir 13 | assert_equal File.join(DOT_GIT, "objects/pack"), @store.packsDir 14 | end 15 | 16 | def test_load_object_with_sha 17 | sha = "226e91f3b4cca13890325f5d33ec050beca99f89" 18 | str = "#!/usr/bin/env ruby\n\nputs \"hello world!\"\n\nputs \"goodbye world.\"\n" 19 | 20 | data = str.dataUsingEncoding NSUTF8StringEncoding 21 | dataP = Pointer.ptr 22 | typeP = Pointer.ptr(:int) 23 | result = @store.loadObjectWithSha1 sha, intoData:dataP, type:typeP, error:nil 24 | 25 | assert result 26 | assert_equal 3, typeP.value 27 | assert data.isEqualTo dataP.value 28 | end 29 | end -------------------------------------------------------------------------------- /Ruby/test/test_repo.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/helper' 2 | 3 | class TestRepo < Test::Unit::TestCase 4 | 5 | def setup 6 | @r = GITRepo.alloc.initWithRoot DOT_GIT, bare:true 7 | end 8 | 9 | def teardown 10 | @r = nil 11 | end 12 | 13 | def test_init_bare 14 | repo = GITRepo.alloc.initWithRoot DOT_GIT, bare:true 15 | assert repo 16 | assert repo.bare? 17 | end 18 | 19 | def test_description 20 | assert_equal "Unnamed repository; edit this file to name it for gitweb.\n", @r.desc 21 | end 22 | 23 | def test_load_blob 24 | sha = "87f974580d485f3cfd5fd9cc62491341067f0c59" 25 | o = @r.objectWithSha1 sha, error:nil 26 | b = @r.blobWithSha1 sha, error:nil 27 | assert_equal o, b 28 | assert_equal "blob", o.type 29 | assert_equal "hello world!\n\ngoodbye world.\n", o.stringValue 30 | end 31 | 32 | def test_load_commit 33 | sha = "f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5" 34 | o = @r.objectWithSha1 sha, error:nil 35 | c = @r.commitWithSha1 sha, error:nil 36 | assert_equal o, c 37 | assert_equal "commit", o.type 38 | assert_equal "removed bang, added goodbye message.", c.message.strip 39 | end 40 | 41 | def test_load_tree 42 | sha = "a9ecfd8989d7c427c5564cf918b264261866ce01" 43 | o = @r.objectWithSha1 sha, error:nil 44 | tree = @r.treeWithSha1 sha, error:nil 45 | assert_equal o, tree 46 | assert_equal "tree", o.type 47 | assert_equal 1, o.entries.count 48 | end 49 | 50 | def test_object_not_found 51 | errorp = Pointer.ptr 52 | o = @r.objectWithSha1 "1"*40, error:errorp 53 | assert_nil o 54 | assert_equal GITError::ObjectNotFound, errorp.value.code 55 | end 56 | 57 | def test_object_type_mismatch 58 | blob_sha = "87f974580d485f3cfd5fd9cc62491341067f0c59" 59 | errorp = Pointer.ptr 60 | o = @r.commitWithSha1 blob_sha, error:errorp 61 | assert_nil o 62 | assert_equal GITError::ObjectTypeMismatch, errorp.value.code 63 | end 64 | 65 | end -------------------------------------------------------------------------------- /Source/Categories/NSCharacterSet+StringComparison.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSCharacterSet+StringComparison.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 25/03/2009. 6 | // Copyright 2009 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class NSString; 12 | @interface NSCharacterSet (StringComparison) 13 | - (BOOL)stringIsComposedOfCharactersInSet:(NSString*)string; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Categories/NSCharacterSet+StringComparison.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSCharacterSet+StringComparison.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 25/03/2009. 6 | // Copyright 2009 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "NSCharacterSet+StringComparison.h" 10 | #import 11 | 12 | @implementation NSCharacterSet (StringComparison) 13 | - (BOOL)stringIsComposedOfCharactersInSet:(NSString*)string 14 | { 15 | NSCharacterSet *inverted = [self invertedSet]; 16 | NSString *filtered = [[string componentsSeparatedByCharactersInSet:inverted] componentsJoinedByString:@""]; 17 | return [string isEqualToString:filtered]; 18 | } 19 | @end 20 | -------------------------------------------------------------------------------- /Source/Categories/NSData+Compression.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Compression.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 29/06/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | // Methods extracted from source given at 9 | // http://www.cocoadev.com/index.pl?NSDataCategory 10 | // 11 | 12 | #import 13 | 14 | /*! Adds compression and decompression messages to NSData. 15 | * Methods extracted from source given at 16 | * http://www.cocoadev.com/index.pl?NSDataCategory 17 | */ 18 | @interface NSData (Compression) 19 | 20 | #pragma mark - 21 | #pragma mark Zlib Compression routines 22 | /*! Returns a data object containing a Zlib decompressed copy of the receivers contents. 23 | * \returns A data object containing a Zlib decompressed copy of the receivers contents. 24 | */ 25 | - (NSData *) zlibInflate; 26 | /*! Returns a data object containing a Zlib compressed copy of the receivers contents. 27 | * \returns A data object containing a Zlib compressed copy of the receivers contents. 28 | */ 29 | - (NSData *) zlibDeflate; 30 | 31 | #pragma mark - 32 | #pragma mark Gzip Compression routines 33 | /*! Returns a data object containing a Gzip decompressed copy of the receivers contents. 34 | * \returns A data object containing a Gzip decompressed copy of the receivers contents. 35 | */ 36 | - (NSData *) gzipInflate; 37 | /*! Returns a data object containing a Gzip compressed copy of the receivers contents. 38 | * \returns A data object containing a Gzip compressed copy of the receivers contents. 39 | */ 40 | - (NSData *) gzipDeflate; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Source/Categories/NSData+Hashing.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Hashing.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 29/06/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | // Methods extracted from source given at 9 | // http://www.cocoadev.com/index.pl?NSDataCategory 10 | // 11 | 12 | #import 13 | 14 | @interface NSData (Hashing) 15 | 16 | #pragma mark - 17 | #pragma mark SHA1 Hashing routines 18 | /*! Returns the SHA1 digest of the receivers contents. 19 | * \return SHA1 digest of the receivers contents. 20 | */ 21 | - (NSData*) sha1Digest; 22 | 23 | /*! Returns a string with the SHA1 digest of the receivers contents. 24 | * \return String with the SHA1 digest of the receivers contents. 25 | */ 26 | - (NSString*) sha1DigestString; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Source/Categories/NSData+HexDump.h: -------------------------------------------------------------------------------- 1 | /* 2 | NSData-HexDump 3 | Extracted From the SSCrypto project: 4 | http://www.septicus.com/SSCrypto/trunk/SSCrypto.m 5 | 6 | 7 | Copyright (c) 2003-2006, Septicus Software All rights reserved. 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are 11 | met: 12 | 13 | * Redistributions of source code must retain the above copyright 14 | notice, this list of conditions and the following disclaimer. 15 | * Redistributions in binary form must reproduce the above copyright 16 | notice, this list of conditions and the following disclaimer in the 17 | documentation and/or other materials provided with the distribution. 18 | * Neither the name of Septicus Software nor the names of its contributors 19 | may be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 23 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 24 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 25 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 26 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #import 36 | 37 | @interface NSData (HexDump) 38 | - (NSString *)hexval; 39 | - (NSString *)hexdump; 40 | @end 41 | -------------------------------------------------------------------------------- /Source/Categories/NSData+Patching.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Patching.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 01/02/2009. 6 | // Copyright 2009 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSData (Patching) 13 | 14 | - (void)patchDeltaHeader:(NSData*)deltaData size:(unsigned long*)size 15 | position:(unsigned long*)position; 16 | - (NSData*)dataByPatchingWithDelta:(NSData*)delta; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Categories/NSData+Searching.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Searching.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 17/07/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSData (Searching) 12 | 13 | /*! Returns the range of bytes up to the first occurrence of byte c from start. 14 | * \return Range of bytes up to the first occurrence of c from start. If c 15 | * can not be found then the NSRange.location will be set to NSNotFound. 16 | * \see memchr 17 | */ 18 | - (NSRange)rangeFrom:(NSInteger)start toByte:(NSInteger)c; 19 | 20 | /*! Returns the range of bytes up to the first NULL byte from start. 21 | * \return Range of bytes up to the first NULL from start. If no NULL 22 | * can be found then the NSRange.location will be set to NSNotFound. 23 | * \see memchr 24 | */ 25 | - (NSRange)rangeOfNullTerminatedBytesFrom:(NSInteger)start; 26 | 27 | /*! Returns a data object containing a copy of the receiver's bytes 28 | * that fall within the limits specified by a given index and the 29 | * end of the bytes. 30 | * \param index Start of the range which defines the limits to extract. 31 | * \return A data object containing a copy of the receiver's bytes 32 | * that fall within the limits of index and the end of the bytes. 33 | * \see -subdataWithRange: 34 | */ 35 | - (NSData*)subdataFromIndex:(NSUInteger)index; 36 | 37 | /*! Returns a data object containing a copy of the receiver's bytes 38 | * that fall within the first byte and index. 39 | * \param index End of the range which defines the limits to extract. 40 | * \return A data object containing a copy of the receiver's bytes 41 | * that fall within the first byte and index. 42 | * \see -subdataWithRange: 43 | */ 44 | - (NSData*)subdataToIndex:(NSUInteger)index; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Source/Categories/NSData+Searching.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Searching.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 17/07/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "NSData+Searching.h" 10 | #import // memchr 11 | 12 | @implementation NSData (Searching) 13 | 14 | - (NSRange)rangeFrom:(NSInteger)start toByte:(NSInteger)c; 15 | { 16 | const char *pdata = [self bytes]; 17 | NSUInteger len = [self length]; 18 | if (start < len) { 19 | char *end = memchr(pdata + start, c, len - start); 20 | if (end != NULL) 21 | return NSMakeRange (start, end - (pdata + start)); 22 | } 23 | return NSMakeRange(NSNotFound, 0); 24 | } 25 | 26 | - (NSRange)rangeOfNullTerminatedBytesFrom:(NSInteger)start 27 | { 28 | return [self rangeFrom:start toByte:0x00]; 29 | } 30 | 31 | - (NSData*)subdataFromIndex:(NSUInteger)anIndex 32 | { 33 | NSRange theRange = NSMakeRange(anIndex, [self length] - anIndex); 34 | return [self subdataWithRange:theRange]; 35 | } 36 | - (NSData*)subdataToIndex:(NSUInteger)anIndex 37 | { 38 | NSRange theRange = NSMakeRange(0, anIndex); 39 | return [self subdataWithRange:theRange]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Source/Categories/NSFileManager+DirHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager+DirHelper.h 3 | // ObjectiveGit 4 | 5 | 6 | #import 7 | 8 | @interface NSFileManager (DirHelpers) 9 | 10 | + (BOOL) directoryExistsAtPath:(NSString *) aPath; 11 | + (BOOL) directoryExistsAtURL:(NSURL *) aURL; 12 | + (BOOL) fileExistsAtPath:(NSString *) aPath; 13 | + (BOOL) fileExistsAtURL:(NSURL *) aURL; 14 | 15 | @end -------------------------------------------------------------------------------- /Source/Categories/NSFileManager+DirHelper.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager+DirHelper.m 3 | // ObjectiveGit 4 | 5 | 6 | #import "NSFileManager+DirHelper.h" 7 | 8 | @implementation NSFileManager (DirHelpers) 9 | 10 | + (BOOL) directoryExistsAtPath:(NSString *) aPath; 11 | { 12 | BOOL isDir; 13 | return [[self defaultManager] fileExistsAtPath:aPath isDirectory:&isDir] && isDir; 14 | } 15 | 16 | + (BOOL) directoryExistsAtURL:(NSURL *) aURL; 17 | { 18 | if (![aURL isFileURL]) 19 | return NO; 20 | 21 | NSString *aPath = [aURL path]; 22 | BOOL isDir; 23 | return [[self defaultManager] fileExistsAtPath:aPath isDirectory:&isDir] && isDir; 24 | } 25 | 26 | + (BOOL) fileExistsAtPath:(NSString *) aPath; 27 | { 28 | return [[self defaultManager] fileExistsAtPath:aPath]; 29 | } 30 | 31 | 32 | + (BOOL) fileExistsAtURL:(NSURL *) aURL; 33 | { 34 | if (![aURL isFileURL]) 35 | return NO; 36 | 37 | NSString *aPath = [aURL path]; 38 | return [[self defaultManager] fileExistsAtPath:aPath]; 39 | } 40 | @end 41 | -------------------------------------------------------------------------------- /Source/Categories/NSTimeZone+Offset.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimeZone+Offset.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 28/07/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface NSTimeZone (Offset) 13 | 14 | /*! Creates and returns a time zone with the specified offset. 15 | * The string is broken down into the hour and minute components 16 | * which are then used to work out the number of seconds from GMT. 17 | * \param offset The timezone offset as a string such as "+0100" 18 | * \return A time zone with the specified offset 19 | * \see +timeZoneForSecondsFromGMT: 20 | */ 21 | + (id)timeZoneWithStringOffset:(NSString*)offset; 22 | 23 | /*! Returns the receivers offset as an HHMM formatted string. 24 | * \return The receivers offset as a string in HHMM format. 25 | */ 26 | - (NSString*)offsetString; 27 | @end 28 | -------------------------------------------------------------------------------- /Source/Categories/NSTimeZone+Offset.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimeZone+Offset.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 28/07/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "NSTimeZone+Offset.h" 10 | 11 | static const unsigned short int HourInSeconds = 3600; 12 | static const unsigned short int MinuteInSeconds = 60; 13 | 14 | @implementation NSTimeZone (Offset) 15 | 16 | + (id)timeZoneWithStringOffset:(NSString*)offset 17 | { 18 | NSString * hours = [offset substringWithRange:NSMakeRange(1, 2)]; 19 | NSString * mins = [offset substringWithRange:NSMakeRange(3, 2)]; 20 | 21 | NSTimeInterval seconds = ([hours integerValue] * HourInSeconds) + ([mins integerValue] * MinuteInSeconds); 22 | if ([offset characterAtIndex:0] == '-') 23 | seconds = seconds * -1; 24 | 25 | return [self timeZoneForSecondsFromGMT:seconds]; 26 | } 27 | - (NSString*)offsetString 28 | { 29 | BOOL negative = NO; 30 | unsigned short int hours, mins; //!< Shouldn't ever be > 60 31 | 32 | NSTimeInterval seconds = [self secondsFromGMT]; 33 | if (seconds < 0) { 34 | negative = YES; 35 | seconds = seconds * -1; 36 | } 37 | 38 | hours = (NSInteger)seconds / HourInSeconds; 39 | mins = ((NSInteger)seconds % HourInSeconds) / MinuteInSeconds; 40 | 41 | return [NSString stringWithFormat:@"%c%02d%02d", 42 | negative ? '-' : '+', hours, mins]; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Source/GITErrors.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITError.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 09/11/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | // We use the __git_error and __git_error_domain macros to 9 | // make it easier to enter and update the error codes in 10 | // the project. If you define them here with the macro then 11 | // you can copy/paste the same code into GITErrors.m and 12 | // then add the value argument to the end of them. 13 | // 14 | 15 | #import 16 | #define __git_error(code) extern const NSInteger code 17 | #define __git_error_domain(dom) extern NSString * dom 18 | 19 | __git_error_domain(GITErrorDomain); 20 | 21 | #import "NSError-OBExtensions.h" 22 | 23 | // Define GITError* macros to use the OmniBase _OBError helper functions. If we decide to move away from OmniBase code, we can just redfine these. 24 | #define GITError(error, code, description) _OBError(error, GITErrorDomain, code, __FILE__, __LINE__, NSLocalizedDescriptionKey, description, nil) 25 | #define GITErrorWithInfo(error, code, ...) _OBError(error, GITErrorDomain, code, __FILE__, __LINE__, ## __VA_ARGS__) 26 | 27 | #pragma mark Object Loading Errors 28 | __git_error(GITErrorObjectSizeMismatch); 29 | __git_error(GITErrorObjectNotFound); 30 | __git_error(GITErrorObjectTypeMismatch); 31 | __git_error(GITErrorObjectParsingFailed); 32 | 33 | #pragma mark File Reading Errors 34 | __git_error(GITErrorFileNotFound); 35 | 36 | #pragma mark Store Error Codes 37 | __git_error(GITErrorObjectStoreNotAccessible); 38 | __git_error(GITErrorRefStoreNotAccessible); 39 | 40 | #pragma mark PACK and Index Error Codes 41 | __git_error(GITErrorPackIndexUnsupportedVersion); 42 | __git_error(GITErrorPackIndexCorrupted); 43 | __git_error(GITErrorPackIndexChecksumMismatch); 44 | __git_error(GITErrorPackIndexNotAvailable); 45 | __git_error(GITErrorPackFileInvalid); 46 | __git_error(GITErrorPackFileNotSupported); 47 | __git_error(GITErrorPackFileChecksumMismatch); 48 | 49 | #undef __git_error 50 | #undef __git_error_domain 51 | -------------------------------------------------------------------------------- /Source/GITErrors.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITError.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 09/11/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITErrors.h" 10 | #define __git_error(code, val) const NSInteger code = val 11 | #define __git_error_domain(dom, str) NSString * dom = str 12 | 13 | __git_error_domain(GITErrorDomain, @"com.manicpanda.GIT.ErrorDomain"); 14 | 15 | #pragma mark Object Loading Errors 16 | __git_error(GITErrorObjectSizeMismatch, -1); 17 | __git_error(GITErrorObjectNotFound, -2); 18 | __git_error(GITErrorObjectTypeMismatch, -3); 19 | __git_error(GITErrorObjectParsingFailed, -4); 20 | 21 | #pragma mark File Reading Errors 22 | __git_error(GITErrorFileNotFound, -100); 23 | 24 | #pragma mark Store Error Codes 25 | __git_error(GITErrorObjectStoreNotAccessible, -200); 26 | __git_error(GITErrorRefStoreNotAccessible, -201); 27 | 28 | #pragma mark PACK and Index Error Codes 29 | __git_error(GITErrorPackIndexUnsupportedVersion, -300); 30 | __git_error(GITErrorPackIndexCorrupted, -301); 31 | __git_error(GITErrorPackIndexChecksumMismatch, -302); 32 | __git_error(GITErrorPackIndexNotAvailable, -303); 33 | 34 | __git_error(GITErrorPackFileInvalid, -400); 35 | __git_error(GITErrorPackFileNotSupported, -401); 36 | __git_error(GITErrorPackFileChecksumMismatch, -402); 37 | 38 | #undef __git_error 39 | -------------------------------------------------------------------------------- /Source/GITUtilityBelt.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITUtilityBelt.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 12/08/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NSData * packSHA1FromBytes(const char *hexBytes); 12 | NSData * packSHA1(NSString * unpackedSHA1); 13 | NSString * unpackSHA1FromString(NSString * packedSHA1); 14 | NSString * unpackSHA1FromData(NSData * packedSHA1); 15 | NSString * unpackSHA1FromBytes(const uint8_t * bytes, unsigned int length); 16 | BOOL isSha1StringValid(NSString *shaString); 17 | NSData * bytesToData(const uint8_t *bytes, unsigned int length); 18 | NSUInteger integerFromBytes(uint8_t * bytes, NSUInteger length); 19 | NSData * intToHexLength(NSUInteger length); 20 | NSUInteger hexLengthToInt(NSData *lengthData); -------------------------------------------------------------------------------- /Source/Graph/GITCommitEnumerator.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITCommitEnumerator.h 3 | // CocoaGit 4 | // 5 | // Created by chapbr on 4/24/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | GITEnumeratorDFS = 0, 13 | GITEnumeratorBFS = 1, 14 | } GITEnumeratorTraversalMode; 15 | 16 | @class GITRepo, GITCommit; 17 | @interface GITCommitEnumerator : NSEnumerator { 18 | GITRepo *repo; 19 | GITEnumeratorTraversalMode mode; 20 | 21 | NSMutableArray *nodeQueue; 22 | NSMutableSet *visitedNodes; 23 | BOOL started; 24 | } 25 | @property (nonatomic, readwrite, retain) GITRepo *repo; 26 | + (id) enumeratorWithRepo:(GITRepo *)gitRepo; 27 | + (id) enumeratorWithRepo:(GITRepo *)gitRepo mode:(GITEnumeratorTraversalMode)theMode; 28 | - (void) setStartCommit:(GITCommit *)startCommit; 29 | @end 30 | -------------------------------------------------------------------------------- /Source/Graph/GITGraph.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITGraph.h 3 | // CocoaGit 4 | // 5 | // Created by chapbr on 4/23/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class GITNode; 12 | @class GITCommit; 13 | @interface GITGraph : NSObject { 14 | NSMutableDictionary *nodes; 15 | } 16 | - (NSUInteger) countOfNodes; 17 | //- (NSUInteger) countOfEdges; 18 | 19 | - (BOOL) hasNode:(GITNode *)aNode; 20 | - (GITNode *) nodeWithKey:(NSString *)aKey; 21 | 22 | - (void) addNode:(GITNode *)newNode; 23 | - (void) removeNode:(GITNode *)aNode; 24 | - (void) addEdgeFromNode:(GITNode *)sourceNode toNode:(GITNode *)targetNode; 25 | //- (void) removeEdgeFromNode:(GITNode *)sourceNode toNode:(GITNode *)targetNode; 26 | 27 | - (void) buildGraphWithStartingCommit:(GITCommit *)commit; 28 | - (NSArray *) nodesSortedByDate; 29 | - (NSArray *) nodesSortedByTopology:(BOOL)useLifo; 30 | 31 | - (void) removeObjectsFromNodes; 32 | //- (void) addCommit:(GITCommit *)gitCommit; 33 | //- (void) removeCommit:(GITCommit *)gitCommit; 34 | //- (void) addCommit:(GITCommit *)gitCommit includeTree:(BOOL)includeTree; 35 | //- (void) removeCommit:(GITCommit *)gitCommit includeTree:(BOOL)includeTree; 36 | @end -------------------------------------------------------------------------------- /Source/Graph/GITNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITNode.h 3 | // CocoaGit 4 | // 5 | // Created by chapbr on 4/23/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GITNode : NSObject 12 | { 13 | id key; 14 | id object; 15 | 16 | // These arrays DO NOT retain members 17 | CFMutableArrayRef inNodes; 18 | CFMutableArrayRef outNodes; 19 | 20 | @public 21 | BOOL visited; 22 | BOOL processed; 23 | NSUInteger indegree; 24 | unsigned long date; 25 | } 26 | @property (readwrite, copy) id key; 27 | @property (readwrite, retain) id object; 28 | @property (readwrite, assign) NSUInteger indegree; 29 | @property (readonly) unsigned long date; 30 | + (id) nodeWithObject:(id)anObject; 31 | - (id) initWithObject:(id)anObject; 32 | - (void) resetIndegree; 33 | - (void) incrementIndegree; 34 | - (void) decrementIndegree; 35 | 36 | - (NSArray *) outNodes; 37 | - (void) addOutNode:(id)outNode; 38 | - (void) removeOutNode:(id)outNode; 39 | 40 | - (NSArray *) inNodes; 41 | - (void) addInNode:(id)inNode; 42 | - (void) removeInNode:(id)inNode; 43 | 44 | - (BOOL) wasVisited; 45 | - (void) visit; 46 | - (void) unvisit; 47 | - (void) incrementIndegree; 48 | - (void) decrementIndegree; 49 | 50 | - (void) removeObject; 51 | @end -------------------------------------------------------------------------------- /Source/Graph/GITRepo+Enumerators.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITRepo+Enumerators.h 3 | // CocoaGit 4 | // 5 | // Created by chapbr on 4/30/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITRepo.h" 11 | 12 | @class GITCommitEnumerator; 13 | @interface GITRepo (Enumerators) 14 | - (NSEnumerator *)commitEnumeratorBFS; 15 | - (NSEnumerator *)commitEnumeratorDFS; 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Graph/GITRepo+Enumerators.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITRepo+Enumerators.m 3 | // CocoaGit 4 | // 5 | // Created by chapbr on 4/30/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import "GITRepo+Enumerators.h" 10 | #import "GITCommitEnumerator.h" 11 | 12 | @implementation GITRepo (Enumerators) 13 | - (NSEnumerator *)commitEnumeratorBFS 14 | { 15 | return [GITCommitEnumerator enumeratorWithRepo:self mode:GITEnumeratorBFS]; 16 | } 17 | 18 | - (NSEnumerator *)commitEnumeratorDFS 19 | { 20 | return [GITCommitEnumerator enumeratorWithRepo:self mode:GITEnumeratorDFS]; 21 | } 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Network/GITClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITClient.h 3 | // CocoaGit 4 | // 5 | // Created by Scott Chacon on 1/3/09. 6 | // Copyright 2009 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Socket.h" 11 | 12 | @interface GITClient : NSObject { 13 | Socket* socket; 14 | } 15 | 16 | @property(retain, readwrite) Socket *socket; 17 | 18 | - (BOOL) clone:(NSString *) url; 19 | - (void) sendPacket:(NSString *)dataWrite; 20 | - (void) writeServer:(NSString *)dataWrite; 21 | - (void) writeServerLength:(NSUInteger)length; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Source/Network/GITFetchProcess.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITFetchProcess.h 3 | // CocoaGit 4 | // 5 | // Created by chapbr on 2/10/09. 6 | // Copyright 2009 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface GITFetchProcess : NSObject { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Network/GITFetchProcess.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITFetchProcess.m 3 | // CocoaGit 4 | // 5 | // Created by chapbr on 2/10/09. 6 | // Copyright 2009 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "GITFetchProcess.h" 10 | 11 | 12 | 13 | @implementation GITFetchProcess 14 | 15 | // -transport startFetch 16 | // (remote: sends refs + flush) 17 | // readRefs 18 | // sendNeeds/Wants? 19 | // (remote: recieve_needs) 20 | // (remote: get_common_commits) 21 | // (remote: send_pack_file + flush) 22 | // receivePackfile 23 | // write objects to disk 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Source/Network/GITServer.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITServer.h 3 | // CocoaGit 4 | // 5 | // Created by Scott Chacon on 1/4/09. 6 | // Copyright 2009 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TCPServer.h" 11 | 12 | @class GITServer; 13 | 14 | @interface GITServer : NSObject { 15 | TCPServer *tcpServer; 16 | NSString *workingDir; 17 | 18 | unsigned short listen_port; 19 | } 20 | 21 | @property(copy, readwrite) NSString *workingDir; 22 | 23 | - (BOOL) shouldExit; 24 | - (oneway void) startListening:(NSString *) gitStartDir; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Source/Network/GITServer.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITServer.m 3 | // CocoaGit 4 | // 5 | // Created by Scott Chacon on 1/4/09. 6 | // Copyright 2009 GitHub. All rights reserved. 7 | // 8 | 9 | #import "GITServer.h" 10 | #import "GITServerHandler.h" 11 | #import "GITRepo.h" 12 | 13 | @implementation GITServer 14 | 15 | @synthesize workingDir; 16 | 17 | - (BOOL) shouldExit { 18 | return false; 19 | } 20 | 21 | - (oneway void) startListening:(NSString *) gitStartDir { 22 | uint16_t port = 9418; 23 | 24 | workingDir = gitStartDir; 25 | 26 | tcpServer = [[TCPServer alloc] init]; 27 | NSError *error = nil; 28 | [tcpServer setPort: port]; 29 | [tcpServer setDelegate: self]; 30 | if (![tcpServer start:&error] ) { 31 | NSLog(@"Error starting server: %@", error); 32 | } else { 33 | NSLog(@"Starting server on port %d", [tcpServer port]); 34 | } 35 | } 36 | 37 | - (void)TCPServer:(TCPServer *)server didReceiveConnectionFromAddress:(NSData *)addr inputStream:(NSInputStream *)inStream outputStream:(NSOutputStream *)outStream { 38 | NSLog(@"New connection received..."); 39 | 40 | NSLog(@"gitdir:%@", workingDir); 41 | 42 | [outStream open]; 43 | [inStream open]; 44 | 45 | GITRepo* git = [GITRepo alloc]; 46 | GITServerHandler *obsh = [[GITServerHandler alloc] init]; 47 | 48 | NSLog(@"INIT WITH GIT: %@ : %@ : %@ : %@ : %@", obsh, git, workingDir, inStream, outStream); 49 | [obsh initWithGit:git gitPath:workingDir input:inStream output:outStream]; 50 | 51 | [outStream close]; 52 | [inStream close]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Source/Network/GITSshTransport.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITSshTransport.h 3 | // CocoaGit 4 | // 5 | // Created by Brian Chapados on 2/12/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITTransport.h" 11 | #import "SSHSession.h" 12 | #import "SSHChannel.h" 13 | 14 | @interface GITSshTransport : GITTransport { 15 | SSHSession *session; 16 | } 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Network/GITTransport.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITTransport.h 3 | // CocoaGit 4 | // 5 | // Created by Brian Chapados on 2/9/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITRepo.h" 11 | #import "BufferedSocket.h" 12 | 13 | extern NSString * const GITTransportFetch; 14 | extern NSString * const GITTransportPush; 15 | extern NSString * const GITTransportOpen; 16 | extern NSString * const GITTransportClosed; 17 | 18 | @interface GITTransport : NSObject { 19 | id connection; 20 | GITRepo *localRepo; 21 | NSURL *remoteURL; 22 | 23 | NSError *error; 24 | NSString *status; 25 | } 26 | @property (nonatomic, retain) GITRepo *localRepo; 27 | @property (nonatomic, copy) NSURL *remoteURL; 28 | 29 | + (BOOL) canHandleURL:(NSURL *)url; 30 | 31 | - (id) initWithURL:(NSURL *)url repo:(GITRepo *)repo; 32 | - (BOOL) connect; 33 | - (void) disconnect; 34 | 35 | // start fetch process 36 | - (void) startFetch; 37 | 38 | // packed I/O 39 | - (NSData *) readPacket; 40 | - (NSString *) readPacketLine; 41 | - (NSArray *) readPackets; 42 | - (NSData *) packetWithString:(NSString *)line; 43 | - (void) writePacket:(NSData *)thePacket; 44 | - (void) writePacketLine:(NSString *)packetLine; 45 | 46 | // pack I/O 47 | - (NSData *) readPackObject; 48 | - (NSData *) readPackObjects; 49 | - (NSData *) readPackStream; 50 | 51 | // status 52 | - (NSString *) transportStatus; 53 | - (NSError *) transportError; 54 | 55 | // connection accessor 56 | - (void) setConnection:(id)newConnection; 57 | - (BufferedSocket *)connection; 58 | @end 59 | -------------------------------------------------------------------------------- /Source/Packs/File/GITPackFileVersion2.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITPackFileVersion2.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 04/11/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITPackFile.h" 10 | 11 | @class GITPackIndex; 12 | @interface GITPackFileVersion2 : GITPackFile 13 | { 14 | NSString * path; 15 | NSData * data; 16 | GITPackIndex * index; 17 | NSUInteger numberOfObjects; 18 | } 19 | 20 | // These may be removed at a later date. 21 | @property(readonly,copy) NSString * path; 22 | @property(readonly,retain) NSData * data; 23 | @property(readonly,retain) GITPackIndex * index; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Source/Packs/File/GITPlaceholderPackFile.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITPlaceholderPackFile.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 04/11/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITPackFile.h" 10 | 11 | 12 | @interface GITPlaceholderPackFile : GITPackFile 13 | { 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Packs/Index/GITPackIndexVersion1.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITPackIndexVersion1.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 04/11/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITPackIndex.h" 10 | 11 | @class GITPackReverseIndex; 12 | @interface GITPackIndexVersion1 : GITPackIndex 13 | { 14 | NSString * path; 15 | NSData * data; 16 | NSArray * offsets; 17 | GITPackReverseIndex *revIndex; 18 | } 19 | 20 | @property(readwrite,copy) NSString * path; 21 | @property(readwrite,retain) NSData * data; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Source/Packs/Index/GITPackIndexVersion2.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITPackIndexVersion2.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 04/11/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITPackIndex.h" 10 | 11 | #define EXTENDED_OFFSET_FLAG (1 << 31) 12 | 13 | @class GITPackReverseIndex; 14 | 15 | @interface GITPackIndexVersion2 : GITPackIndex 16 | { 17 | NSString *path; 18 | NSData *data; 19 | NSArray *offsets; 20 | GITPackReverseIndex *revIndex; 21 | } 22 | 23 | @property(readwrite,copy) NSString * path; 24 | @property(readwrite,retain) NSData * data; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Source/Packs/Index/GITPackReverseIndex.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITPackReverseIndex.h 3 | // CocoaGit 4 | // 5 | // Created by Brian Chapados on 2/16/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class GITPackIndex; 12 | @interface GITPackReverseIndex : NSObject { 13 | GITPackIndex *index; 14 | CFMutableArrayRef offsets; 15 | NSUInteger size; 16 | } 17 | @property (nonatomic, readonly, assign) GITPackIndex *index; 18 | 19 | - (id) initWithPackIndex:(GITPackIndex *)packIndex; 20 | - (NSUInteger) indexWithOffset:(off_t)offset; 21 | - (off_t) nextOffsetWithOffset:(off_t)thisOffset; 22 | - (off_t) baseOffsetWithOffset:(off_t)theOffset; 23 | @end 24 | -------------------------------------------------------------------------------- /Source/Packs/Index/GITPlaceholderPackIndex.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITPlaceholderPackIndex.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 04/11/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITPackIndex.h" 10 | 11 | 12 | @interface GITPlaceholderPackIndex : GITPackIndex 13 | { 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Refs/GITBranch.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITBranch.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/08/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class GITRepo, GITCommit; 12 | @interface GITBranch : NSObject 13 | { 14 | GITRepo * repo; 15 | NSString * name; 16 | } 17 | 18 | @property(readonly,copy) NSString * name; 19 | 20 | - (GITCommit*)head; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Refs/GITBranch.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITBranch.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/08/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITBranch.h" 10 | #import "GITRepo.h" 11 | #import "GITCommit.h" 12 | 13 | /*! \cond 14 | Make properties readwrite so we can use 15 | them within the class. 16 | */ 17 | @interface GITBranch () 18 | @property(readwrite,retain) GITRepo * repo; 19 | @property(readwrite,copy) NSString * name; 20 | @end 21 | /*! \endcond */ 22 | 23 | @implementation GITBranch 24 | @synthesize repo; 25 | @synthesize name; 26 | 27 | - (void) dealloc 28 | { 29 | [repo release], repo = nil; 30 | [name release], name = nil; 31 | [super dealloc]; 32 | } 33 | 34 | - (GITCommit*) head 35 | { 36 | for (NSDictionary *ref in [self.repo refs]) { 37 | if ([[ref objectForKey:@"name"] hasSuffix:self.name]) { 38 | return [self.repo commitWithSha1:[ref objectForKey:@"sha"]]; 39 | } 40 | } 41 | return nil; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Source/Refs/GITRef.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITRef.h 3 | // CocoaGit 4 | // 5 | // Created by Brian Chapados on 2/10/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITRepo.h" 11 | 12 | @class GITRepo; 13 | @class GITCommit; 14 | 15 | @interface GITRef : NSObject { 16 | NSString *name; 17 | NSString *linkName; 18 | NSString *sha1; 19 | BOOL isLink; 20 | BOOL isPacked; 21 | } 22 | @property (nonatomic, copy) NSString *name; 23 | @property (nonatomic, copy) NSString *sha1; 24 | @property (nonatomic, copy) NSString *linkName; 25 | @property (nonatomic, assign) BOOL isLink; 26 | @property (nonatomic, assign) BOOL isPacked; 27 | 28 | + (id) refWithName:(NSString *)refName sha1:(NSString *)sha1String; 29 | + (id) refWithName:(NSString *)refName sha1:(NSString *)sha1String packed:(BOOL)refIsPacked; 30 | + (id) refWithContentsOfFile:(NSString *)aPath name:(NSString *)refName; 31 | + (id) refWithContentsOfFile:(NSString *)aPath; 32 | + (id) refWithPacketLine:(NSString *)packetLine; 33 | 34 | - (id) initWithName:(NSString *)refName sha1:(NSString *)refSha1; 35 | - (id) initWithName:(NSString *)refName sha1:(NSString *)refSha1 packed:(BOOL)refIsPacked; 36 | - (id) initWithName:(NSString *)refName sha1:(NSString *)refSha1 37 | linkName:(NSString *)refLink packed:(BOOL)refIsPacked; 38 | 39 | - (NSString *) shortName; 40 | - (GITCommit *) commitWithRepo:(GITRepo *)repo; 41 | @end -------------------------------------------------------------------------------- /Source/Stores/GITFileStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITFileStore.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 07/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITObjectStore.h" 11 | 12 | /*! Loose file object storage. 13 | * Accesses objects stored as compressed files in .git/objects 14 | * directory. 15 | */ 16 | @interface GITFileStore : GITObjectStore 17 | { 18 | NSString * objectsDir; //!< Path to the .git/objects directory 19 | } 20 | 21 | @property(readonly,copy) NSString * objectsDir; 22 | 23 | /*! Returns the path to the object in the objects directory. 24 | * \param sha1 The object reference to generate the path for. 25 | * \return Path to the object identified by sha1 26 | */ 27 | - (NSString*)stringWithPathToObject:(NSString*)sha1; 28 | @end 29 | -------------------------------------------------------------------------------- /Source/Stores/GITRefStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITRefStore.h 3 | // CocoaGit 4 | // 5 | // Created by chapbr on 4/7/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class GITRepo, GITRef; 12 | 13 | @interface GITRefStore : NSObject { 14 | // properties 15 | NSString *rootDir; 16 | NSString *refsDir; 17 | NSString *packFile; 18 | NSString *headFile; 19 | 20 | // internal state 21 | NSMutableDictionary *cachedRefs; 22 | NSMutableArray *symbolicRefs; 23 | BOOL fetchedLoose; 24 | BOOL fetchedPacked; 25 | } 26 | @property (readwrite, copy) NSString *rootDir; 27 | @property (readwrite, copy) NSString *refsDir; 28 | @property (readwrite, copy) NSString *packFile; 29 | @property (readwrite, copy) NSString *headFile; 30 | 31 | - (id) initWithRepo:(GITRepo *)repo error:(NSError **)error; 32 | - (id) initWithRoot:(NSString *)aPath error:(NSError **)error; 33 | 34 | //- (id) initWithPath:(NSString *)aPath packFile:(NSString *)packedRefsFile error:(NSError **)error; 35 | 36 | - (GITRef *) head; 37 | - (GITRef *) refWithName:(NSString *)refName; 38 | - (GITRef *) refByResolvingSymbolicRef:(GITRef *)symRef; 39 | - (NSString *) sha1WithSymbolicRef:(GITRef *)symRef; 40 | 41 | - (NSArray *) refsWithPrefix:(NSString *)refPrefix; 42 | - (NSArray *) allRefs; 43 | - (NSArray *) branches; 44 | - (NSArray *) heads; 45 | - (NSArray *) tags; 46 | - (NSArray *) remotes; 47 | 48 | - (BOOL) writeRef:(GITRef *)aRef error:(NSError **)error; 49 | - (void) invalidateCachedRefs; 50 | @end -------------------------------------------------------------------------------- /Source/Tools/git-remote.m: -------------------------------------------------------------------------------- 1 | // 2 | // git-remote.m 3 | // CocoaGit 4 | // 5 | // Created by Scott Chacon on 1/6/09. 6 | // Copyright 2009 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITClient.h" 11 | 12 | int main (int argc, const char * argv[]) { 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | NSProcessInfo * info = [NSProcessInfo processInfo]; 15 | NSArray * args = [info arguments]; 16 | 17 | if ([args count] != 2) { 18 | printf("You have to provide a git:// url\n"); 19 | exit(0); 20 | } 21 | 22 | NSString * url = [args objectAtIndex:1]; 23 | GITClient *client = [[GITClient alloc] init]; 24 | [client clone:url]; 25 | 26 | [pool drain]; 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /Source/Tools/git-server.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GITServer.h" 3 | 4 | int main (int argc, const char * argv[]) { 5 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 6 | NSProcessInfo * info = [NSProcessInfo processInfo]; 7 | NSArray * args = [info arguments]; 8 | 9 | if ([args count] != 2) { 10 | printf("You have to provide a path\n"); 11 | exit(0); 12 | } 13 | 14 | NSString * path = [args objectAtIndex:1]; 15 | GITServer *server = [[GITServer alloc] init]; 16 | [server startListening:path]; 17 | 18 | do { 19 | [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; 20 | } while (![server shouldExit]); 21 | 22 | 23 | [pool drain]; 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /Source/Types/GITBlob.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITBlob.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/08/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITObject.h" 11 | 12 | extern NSString * const kGITObjectBlobName; 13 | 14 | /*! Git object type representing a file. 15 | */ 16 | @interface GITBlob : GITObject 17 | { 18 | NSData * data; //!< The binary data of this blob 19 | } 20 | 21 | @property(readonly,copy) NSData * data; 22 | 23 | /*! Returns flag indicating probability that data is textual. 24 | * It is important to note that this indicates only the probability 25 | * that the receiver's data is textual. The indication is based on 26 | * the presence, or lack, of a NULL byte in the receivers 27 | * data. 28 | * \return Flag indicating probability that data is textual. 29 | */ 30 | - (BOOL)canBeRepresentedAsString; 31 | 32 | /*! Returns string contents of data. 33 | * \return String contents of data. 34 | */ 35 | - (NSString*)stringValue; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Source/Types/GITCommit.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITCommit.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/08/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITObject.h" 11 | 12 | extern NSString * const kGITObjectCommitName; 13 | 14 | @class GITTree, GITActor, GITDateTime; 15 | @interface GITCommit : GITObject 16 | { 17 | NSString * treeSha1; 18 | NSArray * parents; 19 | NSArray * parentShas; 20 | 21 | GITTree * tree; 22 | 23 | GITActor * author; 24 | GITActor * committer; 25 | 26 | GITDateTime * authored; 27 | GITDateTime * committed; 28 | unsigned long sortDate; 29 | 30 | NSString * message; 31 | NSData *cachedRawData; 32 | } 33 | 34 | @property(readonly,copy) NSString * treeSha1; 35 | @property(readonly,copy) NSString * parentSha1; 36 | @property(readwrite,retain) NSArray * parentShas; 37 | @property(readonly,copy) GITTree * tree; 38 | @property(readonly,copy) GITCommit * parent; 39 | @property(readonly,copy) NSArray *parents; 40 | @property(readonly,copy) GITActor * author; 41 | @property(readonly,copy) GITActor * committer; 42 | @property(readonly,copy) GITDateTime * authored; 43 | @property(readonly,copy) GITDateTime * committed; 44 | @property(readonly) unsigned long sortDate; 45 | @property(readonly,copy) NSString * message; 46 | 47 | - (BOOL)isFirstCommit; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Source/Types/GITObject+Parsing.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITObject+Parsing.h 3 | // CocoaGit 4 | // 5 | // Created by Brian Chapados on 4/29/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITObject.h" 11 | 12 | struct objectRecord { 13 | char *startPattern; 14 | NSUInteger patternLen; 15 | NSInteger startLen; 16 | NSUInteger matchLen; 17 | char endChar; 18 | }; 19 | 20 | @interface GITObject (Parsing) 21 | BOOL parseObjectRecord(const char **buffer, struct objectRecord delim, const char **matchStart, NSUInteger *matchLength); 22 | // 'create' prefix indicates that the caller owns the string 23 | - (NSString *) createStringWithObjectRecord:(struct objectRecord)record bytes:(const char **)bytes; 24 | - (NSString *) createStringWithObjectRecord:(struct objectRecord)record bytes:(const char **)bytes encoding:(NSStringEncoding)encoding; 25 | @end 26 | -------------------------------------------------------------------------------- /Source/Types/GITTag.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITTag.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/08/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITObject.h" 11 | 12 | extern NSString * const kGITObjectTagName; 13 | 14 | @class GITCommit, GITActor, GITDateTime; 15 | @interface GITTag : GITObject 16 | { 17 | NSString * name; 18 | NSString * objectSha1; 19 | 20 | // At such time as Tags can reference objects 21 | // other than commits we'll change this. 22 | GITCommit * commit; 23 | GITActor * tagger; 24 | 25 | GITDateTime * tagged; 26 | 27 | NSString * message; 28 | } 29 | 30 | @property(readonly,copy) NSString * name; 31 | @property(readonly,copy) NSString * objectSha1; 32 | @property(readonly,copy) GITCommit * commit; 33 | @property(readonly,copy) GITActor * tagger; 34 | @property(readonly,copy) GITDateTime * tagged; 35 | @property(readonly,copy) NSString * message; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Source/Types/GITTree.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITTree.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/08/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GITObject.h" 11 | #import "GITTreeEntry.h" 12 | 13 | extern NSString * const kGITObjectTreeName; 14 | 15 | /*! Git object type representing a directory. 16 | */ 17 | @interface GITTree : GITObject 18 | { 19 | NSArray * entries; //!< Array of entrys in this tree. 20 | } 21 | 22 | @property(readonly,copy) NSArray * entries; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Source/Utils/GITDateTime.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITDateTime.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 07/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface GITDateTime : NSObject { 13 | NSDate * date; 14 | NSTimeZone * timezone; 15 | } 16 | 17 | @property(readonly,copy) NSDate * date; 18 | @property(readonly,copy) NSTimeZone * timezone; 19 | 20 | - (id)initWithDate:(NSDate*)theDate timeZone:(NSTimeZone*)theTimeZone; 21 | - (id)initWithTimestamp:(NSTimeInterval)seconds timeZoneOffset:(NSString*)offset; 22 | 23 | /*! Creates and returns dateTime object given the BSD time (time in seconds since 1970) 24 | * and the timeZone offset from GMT in units of hours*100. The units of hours*100, 25 | * though bizarre, result from converting a typical timeZone string "-0700" into an 26 | * integer. 27 | * \param seconds BSD time (in seconds since 1970). 28 | * \param tz timeZone offset from GMT in units of hours*100. 29 | * \return An actor object with the extracted name and email. 30 | */ 31 | - (id) initWithBSDTime:(unsigned long)seconds timeZoneOffset:(NSInteger)tz; 32 | - (NSComparisonResult)compare:(GITDateTime*)object; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Source/Utils/SSHChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SSHChannel.h 3 | // SSHSession 4 | // 5 | // Created by Brian Chapados on 2/6/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "libssh2.h" 11 | 12 | extern const NSUInteger SSHChannelDefaultReadBufferSize; 13 | 14 | @interface SSHChannel : NSObject { 15 | LIBSSH2_CHANNEL *channel; 16 | 17 | CFIndex readBufferSize; 18 | void *readBuffer; 19 | 20 | NSMutableData *buffer; 21 | NSError *channelError; 22 | } 23 | 24 | - (id) initWithSession:(LIBSSH2_SESSION *)sshSession; 25 | - (id) initWithChannel:(LIBSSH2_CHANNEL *)sshChannel; 26 | //- (void) openShell; 27 | 28 | - (BOOL) execCommand:(NSString *)command; 29 | - (NSMutableData *) readData:(CFIndex)n; 30 | - (NSMutableData *) readDataUpToData:(NSData *)d; 31 | - (NSMutableData *) readDataUpToString:(NSString *)s; 32 | - (void) writeData:(NSData *)data; 33 | - (void) sendEOF; // send channel EOF 34 | - (void) close; 35 | 36 | - (BOOL) isConnected; 37 | 38 | // error accessor 39 | - (NSError *)channelError; 40 | 41 | // read-only copy of buffer 42 | - (NSData *) buffer; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Source/Utils/SSHConnection.h: -------------------------------------------------------------------------------- 1 | // SSHConnection 2 | // Adrian Sampson 3 | // A lightweight Objective-C wrapper for libssh2. For now only supports scp transfers 4 | // and SFTP deletes. 5 | // Functions that return NSError* return NULL on success. 6 | 7 | #import 8 | #include "libssh2.h" 9 | 10 | #define SSHConnectionErrorDomain @"com.pygmy.SSHConnection.ErrorDomain" 11 | #define SSHCONNECTION_ERROR_LOOKUP 4915 // hostname is invalid 12 | #define SSHCONNECTION_ERROR_AUTH 4916 // authentication failed 13 | #define SSHCONNECTION_ERROR_NOSESSION 4917 // tried to write data while not connected 14 | #define SSHCONNECTION_ERROR_SESSION 4918 // couldn't open session 15 | 16 | @interface SSHConnection : NSObject { 17 | int sock; 18 | LIBSSH2_SESSION *session; 19 | 20 | NSString *host; 21 | unsigned short port; 22 | } 23 | @property(readonly) NSString *host; 24 | @property(readonly) unsigned short port; 25 | 26 | // managing SSH connections 27 | -(NSError *)connectToHost:(NSString *)host port:(unsigned short)port user:(NSString *)user password:(NSString *)password; 28 | -(NSError *)connectToHost:(NSString *)host user:(NSString *)user password:(NSString *)password; // port 22 29 | -(void)disconnect; 30 | +(SSHConnection *)connectionToURL:(NSURL *)url; 31 | +(SSHConnection *)connectionToURL:(NSURL *)url error:(NSError **)err; 32 | 33 | // scp transfers 34 | -(NSError *)writeData:(NSData *)data toPath:(NSString *)destPath; 35 | +(NSError *)scpData:(NSData *)data to:(NSURL *)url; 36 | 37 | // sftp deletes 38 | -(NSError *)deleteFileAtPath:(NSString *)path; 39 | +(NSError *)deleteFileAtURL:(NSURL *)url; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Source/Utils/SSHConnectionTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "SSHConnection.h" 3 | 4 | int main (int argc, const char * argv[]) { 5 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 6 | 7 | NSError *err = [SSHConnection scpData:[NSData dataWithBytes:"hellyes" length:7] to:[NSURL URLWithString:@"scp://user:password@host/file.txt"]]; 8 | if (err) 9 | NSLog(@"%@ %@",err,[err userInfo]); 10 | 11 | [pool drain]; 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /Source/Utils/SSHError.h: -------------------------------------------------------------------------------- 1 | // 2 | // SSHError.h 3 | // SSHSession 4 | // 5 | // Created by Brian Chapados on 1/29/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | #import "libssh2.h" 12 | 13 | struct error_code { 14 | NSInteger val; 15 | NSString *identifier; 16 | }; 17 | 18 | #define __ssh_error(code, val) extern struct error_code code 19 | #define __ssh_error_domain(dom, code) extern NSString * const dom 20 | 21 | extern NSString * const SSHErrorDomain; 22 | 23 | #import "NSError-OBExtensions.h" 24 | // Define SSHError* macros to use the OmniBase _OBError helper functions. If we decide to move away from OmniBase code, we can just redfine these. 25 | #define SSHErrorWithDescription(error, code, description, ...) _OBErrorWithDescription(error, SSHErrorDomain, code.val, __FILE__, __LINE__, description) 26 | #define SSHError(error, code, description) _OBError(error, SSHErrorDomain, code, __FILE__, __LINE__, NSLocalizedDescriptionKey, description, nil) 27 | #define SSHErrorWithInfo(error, code, ...) _OBError(error, SSHErrorDomain, code, __FILE__, __LINE__, ## __VA_ARGS__) 28 | 29 | __ssh_error(SSHErrorLookup, 4915); 30 | __ssh_error(SSHErrorAuth, 4916); 31 | __ssh_error(SSHErrorNoSession, 4917); 32 | __ssh_error(SSHErrorSession, 4918); 33 | __ssh_error(SSHErrorChannel, 4919); 34 | __ssh_error(SSHErrorSocketOpen, 4920); 35 | __ssh_error(SSHErrorSocketConnection, 4921); 36 | 37 | NSString *libssh2ErrorDescription(LIBSSH2_SESSION *session, NSString *description); 38 | 39 | 40 | #undef __ssh_error 41 | #undef __ssh_error_domain -------------------------------------------------------------------------------- /Source/Utils/SSHError.m: -------------------------------------------------------------------------------- 1 | // 2 | // SSHError.m 3 | // SSHSession 4 | // 5 | // Created by Brian Chapados on 1/29/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | 10 | #import "SSHError.h" 11 | 12 | 13 | #define __ssh_error_domain(dom, str) NSString * const dom = str 14 | #define __ssh_error(code, val) struct error_code code = { val, @#code } 15 | 16 | __ssh_error_domain(SSHErrorDomain, @"org.sciencegeeks.SSHSession.ErrorDomain"); 17 | 18 | __ssh_error(SSHErrorLookup, 4915); 19 | __ssh_error(SSHErrorAuth, 4916); 20 | __ssh_error(SSHErrorNoSession, 4917); 21 | __ssh_error(SSHErrorSession, 4918); 22 | __ssh_error(SSHErrorChannel, 4919); 23 | __ssh_error(SSHErrorSocketOpen, 4920); 24 | __ssh_error(SSHErrorSocketConnection, 4921); 25 | 26 | 27 | // generates an error message based on the last error reported by libssh2, preceded by a more general general description 28 | NSString *libssh2ErrorDescription(LIBSSH2_SESSION *session, NSString *description) 29 | { 30 | char *ssh2_error; 31 | int ssh2_code = libssh2_session_last_error(session, &ssh2_error, NULL, 0); 32 | 33 | NSString *errorDescription; 34 | if (strlen(ssh2_error) == 0) { 35 | errorDescription = [NSString stringWithFormat:@"%@ ([LIBSSH2 Error %d]", description, ssh2_code]; 36 | } else { 37 | errorDescription = [NSString stringWithFormat:@"%@ ([LIBSSH2 Error %d]: %s)", description, ssh2_code,ssh2_error]; 38 | } 39 | return errorDescription; 40 | } -------------------------------------------------------------------------------- /Source/Utils/SSHSession.h: -------------------------------------------------------------------------------- 1 | // 2 | // SSHSession.h 3 | // SSHSession 4 | // 5 | // Created by Brian Chapados on 2/6/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | #import "SSHChannel.h" 12 | 13 | extern NSString * const SSHUserDirectory; 14 | extern NSString * const SSHUserPublicKeyFileKey; 15 | extern NSString * const SSHUserPublicKeyFile; 16 | extern NSString * const SSHUserPrivateKeyFileKey; 17 | extern NSString * const SSHUserPrivateKeyFile; 18 | 19 | @interface SSHSession : NSObject { 20 | NSSocketNativeHandle native; 21 | LIBSSH2_SESSION *session; 22 | NSDictionary *config; 23 | } 24 | @property (readwrite, copy) NSDictionary *config; 25 | 26 | + (id) sessionToHost:(NSString *)aHost port:(unsigned short)aPort error:(NSError **)error; 27 | 28 | - (id) initWithSocket:(NSSocketNativeHandle)sock; 29 | - (BOOL) start:(NSError **) error; 30 | - (BOOL) disconnect; 31 | 32 | // configuration - mainly for public-key auth right now 33 | - (NSDictionary *) configurationWithSshDir:(NSString *)sshDir publicKey:(NSString *)publicKey privateKey:(NSString *)privateKey; 34 | - (NSDictionary *) configurationWithPublicKey:(NSString *)publicKey privateKey:(NSString *)privateKey; 35 | - (NSDictionary *) defaultConfiguration; 36 | 37 | // authentication 38 | - (NSString *)authenticationTypesWithUser:(NSString *)username; 39 | - (BOOL) authenticateUser:(NSString *)username password:(NSString *)password; 40 | - (BOOL) authenticateUser:(NSString *)username publicKeyFile:(NSString *)publicKeyFile privateKeyFile:(NSString *)privateKeyFile password:(NSString *)password; 41 | - (BOOL) authenticateUser:(NSString *)username; 42 | - (BOOL) isFingerprintValid; 43 | 44 | // factory methods for opening channels 45 | //- (SSHChannel *)channelWithShell; 46 | - (SSHChannel *)channelWithCommand:(NSString *)command; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Source/Vendor/SmallSockets/Socket.h: -------------------------------------------------------------------------------- 1 | // 2 | // Socket.h 3 | // 4 | // SmallSockets Library (http://smallsockets.sourceforge.net/) 5 | // 6 | // Copyright (C) 2001 Steven Frank (stevenf@panic.com) 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must 17 | // not claim that you wrote the original software. If you use this 18 | // software in a product, an acknowledgment in the product 19 | // documentation (and/or about box) would be appreciated but is not 20 | // required. 21 | // 22 | // 2. Altered source versions must be plainly marked as such, and must 23 | // not be misrepresented as being the original software. 24 | // 25 | // 3. This notice may not be removed or altered from any source 26 | // distribution. 27 | // 28 | 29 | #import "AbstractSocket.h" 30 | 31 | @interface Socket : AbstractSocket 32 | { 33 | } 34 | 35 | // Convenience constructor 36 | 37 | + (Socket*)socket; 38 | 39 | // Receiving connections 40 | 41 | - (Socket*)acceptConnectionAndKeepListening; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /UnitTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.manicpanda.${PRODUCT_NAME:identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | NSMainNibFile 20 | MainMenu 21 | NSPrincipalClass 22 | NSApplication 23 | 24 | 25 | -------------------------------------------------------------------------------- /UnitTests/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.manicpanda.${PRODUCT_NAME:identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /UnitTests/Resources/README.txt: -------------------------------------------------------------------------------- 1 | # Test PACK files for cocoagit 2 | 3 | ## Generating pack/idx files for testing 4 | 5 | The pack file has the following properties: 6 | 7 | - all objects for commits 1 -> tag 0.2.5 (85f6ab) 8 | - objects with offsets above 300,000 are stored as extended 64-bit offsets (for testing purposes) 9 | - v2 pack and v2 index files 10 | 11 | ### delta-ofs pack files: 12 | 13 | git-rev-list --objects 85f6ab303f8f6601377ce2d8ebcf186c4b5d7d68 | git-pack-objects --no-reuse-object --delta-base-offset --index-version=2,300000 cg-0.2.5-deltaofs 14 | 15 | ### delta-ref pack files: 16 | 17 | git-rev-list --objects 85f6ab303f8f6601377ce2d8ebcf186c4b5d7d68 | git-pack-objects --no-reuse-object --index-version=2,300000 cg-0.2.5-deltaref 18 | 19 | ### generate a version 1 index file for an existing pack 20 | 21 | git-index-pack -o \ 22 | cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.v1.idx \ 23 | --index-version=1 \ 24 | cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack 25 | 26 | ## Listing the contents of packfiles 27 | 28 | git-verify-pack -v 29 | 30 | ### Sort by offset 31 | 32 | git-verify-pack -v | grep -v ^chain | sort -n -k+5 33 | 34 | ## Generating Property-List Fixtures 35 | 36 | Edit the pack-fixtures.nu file and then run it to generate packFixtures.nu 37 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = true 5 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file to name it for gitweb. 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/hooks/applypatch-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message taken by 4 | # applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. The hook is 8 | # allowed to edit the commit message file. 9 | # 10 | # To enable this hook, make this file executable. 11 | 12 | . git-sh-setup 13 | test -x "$GIT_DIR/hooks/commit-msg" && 14 | exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} 15 | : 16 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/hooks/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message. 4 | # Called by git-commit with one argument, the name of the file 5 | # that has the commit message. The hook should exit with non-zero 6 | # status after issuing an appropriate message if it wants to stop the 7 | # commit. The hook is allowed to edit the commit message file. 8 | # 9 | # To enable this hook, make this file executable. 10 | 11 | # Uncomment the below to add a Signed-off-by line to the message. 12 | # Doing this in a hook is a bad idea in general, but the prepare-commit-msg 13 | # hook is more suited to it. 14 | # 15 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 16 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 17 | 18 | # This example catches duplicate Signed-off-by lines. 19 | 20 | test "" = "$(grep '^Signed-off-by: ' "$1" | 21 | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { 22 | echo >&2 Duplicate Signed-off-by lines. 23 | exit 1 24 | } 25 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/hooks/post-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script that is called after a successful 4 | # commit is made. 5 | # 6 | # To enable this hook, make this file executable. 7 | 8 | : Nothing 9 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/hooks/post-receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script for the post-receive event 4 | # 5 | # This script is run after receive-pack has accepted a pack and the 6 | # repository has been updated. It is passed arguments in through stdin 7 | # in the form 8 | # 9 | # For example: 10 | # aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master 11 | # 12 | # see contrib/hooks/ for an sample, or uncomment the next line (on debian) 13 | # 14 | 15 | 16 | #. /usr/share/doc/git-core/contrib/hooks/post-receive-email 17 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/hooks/post-update: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare a packed repository for use over 4 | # dumb transports. 5 | # 6 | # To enable this hook, make this file executable by "chmod +x post-update". 7 | 8 | exec git-update-server-info 9 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/hooks/pre-applypatch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed 4 | # by applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. 8 | # 9 | # To enable this hook, make this file executable. 10 | 11 | . git-sh-setup 12 | test -x "$GIT_DIR/hooks/pre-commit" && 13 | exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} 14 | : 15 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed. 4 | # Called by git-commit with no arguments. The hook should 5 | # exit with non-zero status after issuing an appropriate message if 6 | # it wants to stop the commit. 7 | # 8 | # To enable this hook, make this file executable. 9 | 10 | # This is slightly modified from Andrew Morton's Perfect Patch. 11 | # Lines you introduce should not have trailing whitespace. 12 | # Also check for an indentation that has SP before a TAB. 13 | 14 | if git-rev-parse --verify HEAD 2>/dev/null 15 | then 16 | git-diff-index -p -M --cached HEAD -- 17 | else 18 | # NEEDSWORK: we should produce a diff with an empty tree here 19 | # if we want to do the same verification for the initial import. 20 | : 21 | fi | 22 | perl -e ' 23 | my $found_bad = 0; 24 | my $filename; 25 | my $reported_filename = ""; 26 | my $lineno; 27 | sub bad_line { 28 | my ($why, $line) = @_; 29 | if (!$found_bad) { 30 | print STDERR "*\n"; 31 | print STDERR "* You have some suspicious patch lines:\n"; 32 | print STDERR "*\n"; 33 | $found_bad = 1; 34 | } 35 | if ($reported_filename ne $filename) { 36 | print STDERR "* In $filename\n"; 37 | $reported_filename = $filename; 38 | } 39 | print STDERR "* $why (line $lineno)\n"; 40 | print STDERR "$filename:$lineno:$line\n"; 41 | } 42 | while (<>) { 43 | if (m|^diff --git a/(.*) b/\1$|) { 44 | $filename = $1; 45 | next; 46 | } 47 | if (/^@@ -\S+ \+(\d+)/) { 48 | $lineno = $1 - 1; 49 | next; 50 | } 51 | if (/^ /) { 52 | $lineno++; 53 | next; 54 | } 55 | if (s/^\+//) { 56 | $lineno++; 57 | chomp; 58 | if (/\s$/) { 59 | bad_line("trailing whitespace", $_); 60 | } 61 | if (/^\s* \t/) { 62 | bad_line("indent SP followed by a TAB", $_); 63 | } 64 | if (/^([<>])\1{6} |^={7}$/) { 65 | bad_line("unresolved merge conflict", $_); 66 | } 67 | } 68 | } 69 | exit($found_bad); 70 | ' 71 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/hooks/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare the commit log message. 4 | # Called by git-commit with the name of the file that has the 5 | # commit message, followed by the description of the commit 6 | # message's source. The hook's purpose is to edit the commit 7 | # message file. If the hook fails with a non-zero status, 8 | # the commit is aborted. 9 | # 10 | # To enable this hook, make this file executable. 11 | 12 | # This hook includes three examples. The first comments out the 13 | # "Conflicts:" part of a merge commit. 14 | # 15 | # The second includes the output of "git diff --name-status -r" 16 | # into the message, just before the "git status" output. It is 17 | # commented because it doesn't cope with --amend or with squashed 18 | # commits. 19 | # 20 | # The third example adds a Signed-off-by line to the message, that can 21 | # still be edited. This is rarely a good idea. 22 | 23 | case "$2 $3" in 24 | merge) 25 | sed -i '/^Conflicts:/,/#/!b;s/^/# &/;s/^# #/#/' "$1" ;; 26 | 27 | # ""|template) 28 | # perl -i -pe ' 29 | # print "\n" . `git diff --cached --name-status -r` 30 | # if /^#/ && $first++ == 0' "$1" ;; 31 | 32 | *) ;; 33 | esac 34 | 35 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 36 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 37 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/info/exclude: -------------------------------------------------------------------------------- 1 | # git-ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/04/f612c594705792ee5c9cb6770cb926f820745e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/04/f612c594705792ee5c9cb6770cb926f820745e -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/06/a42c6a5c76120e9adc7d5efd79d9c9eaef936f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/06/a42c6a5c76120e9adc7d5efd79d9c9eaef936f -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/08/714c9842200451c582ab035ec16c16fffaf908: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/08/714c9842200451c582ab035ec16c16fffaf908 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/0d/7696b4c809b22949fac121f0db427dc6099ce5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/0d/7696b4c809b22949fac121f0db427dc6099ce5 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/10/3f361dd2c9df04c07cd1135433378852a44e32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/10/3f361dd2c9df04c07cd1135433378852a44e32 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/10/e19ae4b43d07b757beee214eeadcaad2502562: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/10/e19ae4b43d07b757beee214eeadcaad2502562 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/11/49d003e24c0794751ba34cbbca6dc562dfdf9b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/11/49d003e24c0794751ba34cbbca6dc562dfdf9b -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/12/e183104e82db8cc7fd3b17a69aec46fb1d9487: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/12/e183104e82db8cc7fd3b17a69aec46fb1d9487 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/1b/06b417010400c92a4d9b840f136315fd83430e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/1b/06b417010400c92a4d9b840f136315fd83430e -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/1b/91aa304c105a96746a7ffa267ac82e99480dd0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/1b/91aa304c105a96746a7ffa267ac82e99480dd0 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/1d/ba503f40006d1d89552b4dc8a25dc1a6a4e013: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/1d/ba503f40006d1d89552b4dc8a25dc1a6a4e013 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/1e/fdc251e26c6d408d7df8ebbc953a228c79afa1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/1e/fdc251e26c6d408d7df8ebbc953a228c79afa1 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/22/6e91f3b4cca13890325f5d33ec050beca99f89: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/22/6e91f3b4cca13890325f5d33ec050beca99f89 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/22/fe0f5e3f062c500c1b2076acef7fed43a32084: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/22/fe0f5e3f062c500c1b2076acef7fed43a32084 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/24/e8a3b08ebe2162aa90bbb7702a3c5189335dc6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/24/e8a3b08ebe2162aa90bbb7702a3c5189335dc6 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/24/f1a3f184cada0b9f4f389d482061975dc0c23c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/24/f1a3f184cada0b9f4f389d482061975dc0c23c -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/25/793ba675da6ef31eb6aa43328467dd8db2a3bf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/25/793ba675da6ef31eb6aa43328467dd8db2a3bf -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/28/5c37cc39a59bf80140f7e488cfc10e01ab02c6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/28/5c37cc39a59bf80140f7e488cfc10e01ab02c6 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/2b/b318d2c722b344f6fae8ec274d0c7df9020544: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/2b/b318d2c722b344f6fae8ec274d0c7df9020544 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/31/35253e5dd7ab4fc53e72bb1192887c3e437574: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/31/35253e5dd7ab4fc53e72bb1192887c3e437574 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/34/d90f9fea9734ebea38a3349713de9c7ddc9102: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/34/d90f9fea9734ebea38a3349713de9c7ddc9102 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/36/bc27f9730d6e142251537ce8f00f00916c4510: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/36/bc27f9730d6e142251537ce8f00f00916c4510 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/3c/a188481c60fe3f0a1a60f500a26710a5961593: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/3c/a188481c60fe3f0a1a60f500a26710a5961593 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/41/0f428a7effbe61254b5b36611d37aac160736b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/41/0f428a7effbe61254b5b36611d37aac160736b -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/41/e234c127cac1b154ba070c208b4f7bf390a744: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/41/e234c127cac1b154ba070c208b4f7bf390a744 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/45/f55f811d43dd9a1358458034d4400a408c711c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/45/f55f811d43dd9a1358458034d4400a408c711c -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/55/43323c6b02f4fb30940f780c4431d32829e76b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/55/43323c6b02f4fb30940f780c4431d32829e76b -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/5b/e456aea74a055c376a271e14c14f60d97cb68c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/5b/e456aea74a055c376a271e14c14f60d97cb68c -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/65/6af6710f7e2420bd2530d1c53822d1458646a2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/65/6af6710f7e2420bd2530d1c53822d1458646a2 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/6c/be32dc1cfd3ca776760c8c862006319460e271: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/6c/be32dc1cfd3ca776760c8c862006319460e271 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/74/5420bbf194392f22694e68f7cdd41234c35f4e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/74/5420bbf194392f22694e68f7cdd41234c35f4e -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/78/d245f1a50bfd53821f70bf211d252fe9884d86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/78/d245f1a50bfd53821f70bf211d252fe9884d86 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/7a/fb4770045be464c04b3a6f9cf2dd4e6432a6b7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/7a/fb4770045be464c04b3a6f9cf2dd4e6432a6b7 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/7c/60eee9a2238b1de8a1bdfe7e607e72a00fba4d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/7c/60eee9a2238b1de8a1bdfe7e607e72a00fba4d -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/7d/68b1f916cfc73c2771bd3282a4f913f767bae2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/7d/68b1f916cfc73c2771bd3282a4f913f767bae2 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/86/0204d1ca9f7e50ba9949aa76117895b5b1a136: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/86/0204d1ca9f7e50ba9949aa76117895b5b1a136 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/87/f974580d485f3cfd5fd9cc62491341067f0c59: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/87/f974580d485f3cfd5fd9cc62491341067f0c59 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/8c/2a16604844b7762fd6545339693cfe822cc75b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/8c/2a16604844b7762fd6545339693cfe822cc75b -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/8e/065cdc3e97c1d77a19d519d72e8e02010b1e83: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/8e/065cdc3e97c1d77a19d519d72e8e02010b1e83 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/8f/6c301d8bfe4c0cc3d8670955f82f872f39f5a3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/8f/6c301d8bfe4c0cc3d8670955f82f872f39f5a3 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/90/74e33cdc6bf858efb14922770e75f4a3eb5628: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/90/74e33cdc6bf858efb14922770e75f4a3eb5628 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/9c/3e26256583d93113e272024e6711fd477429df: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/9c/3e26256583d93113e272024e6711fd477429df -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/a0/336d66110dbe7efd1845517e5a510a78d19db9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/a0/336d66110dbe7efd1845517e5a510a78d19db9 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/a3/672be369df28ba4d75141d8c3a10ee3fcabffa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/a3/672be369df28ba4d75141d8c3a10ee3fcabffa -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/a4/c0e695258d0ac4cbcbd33177d42dada3185623: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/a4/c0e695258d0ac4cbcbd33177d42dada3185623 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/a7/959d4a69d6771b26c9c2090ccadd35b81d5387: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/a7/959d4a69d6771b26c9c2090ccadd35b81d5387 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/a9/ecfd8989d7c427c5564cf918b264261866ce01: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/a9/ecfd8989d7c427c5564cf918b264261866ce01 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/ac/694533945c766d9d4e9ad36c3d15ad943b61db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/ac/694533945c766d9d4e9ad36c3d15ad943b61db -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/b8/ea533af44f544877babe0aaabc1d7f3ed2593f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/b8/ea533af44f544877babe0aaabc1d7f3ed2593f -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/b9/237bcb41c35873521545f3e0bbc825ea847d84: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/b9/237bcb41c35873521545f3e0bbc825ea847d84 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/c4/316dabeac43115f00be867fd22426f54d5040f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/c4/316dabeac43115f00be867fd22426f54d5040f -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/c7/83b29bcb9adefa70ed141aabf066f9f1c3beda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/c7/83b29bcb9adefa70ed141aabf066f9f1c3beda -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/cd/1b673074ab3f84a354929a99d1cc6e1eb5ef53: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/cd/1b673074ab3f84a354929a99d1cc6e1eb5ef53 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/d1/094a69e97b36db6ebf7142489d0a7402fdb124: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/d1/094a69e97b36db6ebf7142489d0a7402fdb124 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/d4/a7449cb88ad9fe6f6ab334b3fd3f569a9f35a0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/d4/a7449cb88ad9fe6f6ab334b3fd3f569a9f35a0 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/d8/094720229e2975cc639b028f56602baa6f8715: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/d8/094720229e2975cc639b028f56602baa6f8715 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/dc/5c47bc4259f7d16e8625225a15d78ee90560c1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/dc/5c47bc4259f7d16e8625225a15d78ee90560c1 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/e2/52da6072a2f887a1f0165177ec068baf566d0e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/e2/52da6072a2f887a1f0165177ec068baf566d0e -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/e8/c378f20149cd520f99d32b164f181e68dd6588: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/e8/c378f20149cd520f99d32b164f181e68dd6588 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/e8/e796b690324f705757ea9c3f9a62e94e026257: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/e8/e796b690324f705757ea9c3f9a62e94e026257 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/f3/fbea20d8078597678c4d451a57a182114387c6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/f3/fbea20d8078597678c4d451a57a182114387c6 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/f7/e7e7d240ccdae143b064aa7467eb2fa91aa8a5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/f7/e7e7d240ccdae143b064aa7467eb2fa91aa8a5 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/f8/474afb42704352dcd37751c15ae68d7d21fbc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/f8/474afb42704352dcd37751c15ae68d7d21fbc2 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/f8/5a47c40f8de414905e93e907920e8c16f6e572: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/f8/5a47c40f8de414905e93e907920e8c16f6e572 -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/info/packs: -------------------------------------------------------------------------------- 1 | P pack-709b858145841a007ab0c53e130630fd1eecea6f.pack 2 | 3 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/pack/pack-709b858145841a007ab0c53e130630fd1eecea6f.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/pack/pack-709b858145841a007ab0c53e130630fd1eecea6f.idx -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/objects/pack/pack-709b858145841a007ab0c53e130630fd1eecea6f.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git/objects/pack/pack-709b858145841a007ab0c53e130630fd1eecea6f.pack -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/refs/heads/branch1: -------------------------------------------------------------------------------- 1 | 1dba503f40006d1d89552b4dc8a25dc1a6a4e013 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/refs/heads/branch2: -------------------------------------------------------------------------------- 1 | b9237bcb41c35873521545f3e0bbc825ea847d84 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/refs/heads/branch3: -------------------------------------------------------------------------------- 1 | 7d68b1f916cfc73c2771bd3282a4f913f767bae2 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/refs/heads/master: -------------------------------------------------------------------------------- 1 | f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/refs/heads/revwalk: -------------------------------------------------------------------------------- 1 | 8c2a16604844b7762fd6545339693cfe822cc75b 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/refs/heads/revwalk-test: -------------------------------------------------------------------------------- 1 | 1b06b417010400c92a4d9b840f136315fd83430e 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git/refs/heads/ruby: -------------------------------------------------------------------------------- 1 | d8094720229e2975cc639b028f56602baa6f8715 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/FETCH_HEAD: -------------------------------------------------------------------------------- 1 | a5070c0f18c3ed4d42d3d4d807220cfcb1d4e30b branch 'master' of git://github.com/chapados/cocoagit 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/nu 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | [remote "github"] 7 | url = git://github.com/chapados/cocoagit.git/ 8 | fetch = +refs/heads/master:refs/remotes/github/master 9 | [remote "geoffgarside"] 10 | url = git://github.com/geoffgarside/cocoagit.git 11 | fetch = +refs/heads/*:refs/remotes/geoffgarside/* 12 | [branch "geoffgarside/master"] 13 | remote = geoffgarside 14 | merge = refs/heads/master 15 | 16 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file to name it for gitweb. 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/hooks/applypatch-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message taken by 4 | # applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. The hook is 8 | # allowed to edit the commit message file. 9 | # 10 | # To enable this hook, make this file executable. 11 | 12 | . git-sh-setup 13 | test -x "$GIT_DIR/hooks/commit-msg" && 14 | exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} 15 | : 16 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/hooks/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message. 4 | # Called by git-commit with one argument, the name of the file 5 | # that has the commit message. The hook should exit with non-zero 6 | # status after issuing an appropriate message if it wants to stop the 7 | # commit. The hook is allowed to edit the commit message file. 8 | # 9 | # To enable this hook, make this file executable. 10 | 11 | # Uncomment the below to add a Signed-off-by line to the message. 12 | # Doing this in a hook is a bad idea in general, but the prepare-commit-msg 13 | # hook is more suited to it. 14 | # 15 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 16 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 17 | 18 | # This example catches duplicate Signed-off-by lines. 19 | 20 | test "" = "$(grep '^Signed-off-by: ' "$1" | 21 | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { 22 | echo >&2 Duplicate Signed-off-by lines. 23 | exit 1 24 | } 25 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/hooks/post-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script that is called after a successful 4 | # commit is made. 5 | # 6 | # To enable this hook, make this file executable. 7 | 8 | : Nothing 9 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/hooks/post-receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script for the post-receive event 4 | # 5 | # This script is run after receive-pack has accepted a pack and the 6 | # repository has been updated. It is passed arguments in through stdin 7 | # in the form 8 | # 9 | # For example: 10 | # aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master 11 | # 12 | # see contrib/hooks/ for an sample, or uncomment the next line (on debian) 13 | # 14 | 15 | 16 | #. /usr/share/doc/git-core/contrib/hooks/post-receive-email 17 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/hooks/post-update: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare a packed repository for use over 4 | # dumb transports. 5 | # 6 | # To enable this hook, make this file executable by "chmod +x post-update". 7 | 8 | exec git-update-server-info 9 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/hooks/pre-applypatch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed 4 | # by applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. 8 | # 9 | # To enable this hook, make this file executable. 10 | 11 | . git-sh-setup 12 | test -x "$GIT_DIR/hooks/pre-commit" && 13 | exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} 14 | : 15 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed. 4 | # Called by git-commit with no arguments. The hook should 5 | # exit with non-zero status after issuing an appropriate message if 6 | # it wants to stop the commit. 7 | # 8 | # To enable this hook, make this file executable. 9 | 10 | # This is slightly modified from Andrew Morton's Perfect Patch. 11 | # Lines you introduce should not have trailing whitespace. 12 | # Also check for an indentation that has SP before a TAB. 13 | 14 | if git-rev-parse --verify HEAD 2>/dev/null 15 | then 16 | git-diff-index -p -M --cached HEAD -- 17 | else 18 | # NEEDSWORK: we should produce a diff with an empty tree here 19 | # if we want to do the same verification for the initial import. 20 | : 21 | fi | 22 | perl -e ' 23 | my $found_bad = 0; 24 | my $filename; 25 | my $reported_filename = ""; 26 | my $lineno; 27 | sub bad_line { 28 | my ($why, $line) = @_; 29 | if (!$found_bad) { 30 | print STDERR "*\n"; 31 | print STDERR "* You have some suspicious patch lines:\n"; 32 | print STDERR "*\n"; 33 | $found_bad = 1; 34 | } 35 | if ($reported_filename ne $filename) { 36 | print STDERR "* In $filename\n"; 37 | $reported_filename = $filename; 38 | } 39 | print STDERR "* $why (line $lineno)\n"; 40 | print STDERR "$filename:$lineno:$line\n"; 41 | } 42 | while (<>) { 43 | if (m|^diff --git a/(.*) b/\1$|) { 44 | $filename = $1; 45 | next; 46 | } 47 | if (/^@@ -\S+ \+(\d+)/) { 48 | $lineno = $1 - 1; 49 | next; 50 | } 51 | if (/^ /) { 52 | $lineno++; 53 | next; 54 | } 55 | if (s/^\+//) { 56 | $lineno++; 57 | chomp; 58 | if (/\s$/) { 59 | bad_line("trailing whitespace", $_); 60 | } 61 | if (/^\s* \t/) { 62 | bad_line("indent SP followed by a TAB", $_); 63 | } 64 | if (/^([<>])\1{6} |^={7}$/) { 65 | bad_line("unresolved merge conflict", $_); 66 | } 67 | } 68 | } 69 | exit($found_bad); 70 | ' 71 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/hooks/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare the commit log message. 4 | # Called by git-commit with the name of the file that has the 5 | # commit message, followed by the description of the commit 6 | # message's source. The hook's purpose is to edit the commit 7 | # message file. If the hook fails with a non-zero status, 8 | # the commit is aborted. 9 | # 10 | # To enable this hook, make this file executable. 11 | 12 | # This hook includes three examples. The first comments out the 13 | # "Conflicts:" part of a merge commit. 14 | # 15 | # The second includes the output of "git diff --name-status -r" 16 | # into the message, just before the "git status" output. It is 17 | # commented because it doesn't cope with --amend or with squashed 18 | # commits. 19 | # 20 | # The third example adds a Signed-off-by line to the message, that can 21 | # still be edited. This is rarely a good idea. 22 | 23 | case "$2 $3" in 24 | merge) 25 | sed -i '/^Conflicts:/,/#/!b;s/^/# &/;s/^# #/#/' "$1" ;; 26 | 27 | # ""|template) 28 | # perl -i -pe ' 29 | # print "\n" . `git diff --cached --name-status -r` 30 | # if /^#/ && $first++ == 0' "$1" ;; 31 | 32 | *) ;; 33 | esac 34 | 35 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 36 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 37 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/dot_git_refs/index -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/info/exclude: -------------------------------------------------------------------------------- 1 | # git-ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/heads/facepalm: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 fdb9468ea860f43bf1808b3f1e950ac3b53bc3c4 Brian Chapados 1239137616 -0700 branch: Created from fdb9468ea 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/heads/geoffgarside/master: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 bdfe90051aa8334cb69bb763fd0cb0796150510c chapbr 1239097617 -0700 fetch /Users/chapbr/repos/cocoagit geoffgarside/master:geoffgarside/master tag v0.2.5: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/heads/geoffgarside/nserror: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 9bcacde3ebb46908cbee5ccdbfd03bcf3dadb6f5 chapbr 1239097725 -0700 fetch /Users/chapbr/repos/cocoagit geoffgarside/nserror:geoffgarside/nserror tag v0.2.5: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/heads/ghunit: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 2755fbad95adf007af7bb41a8bdaa8bcf538d0b5 Brian Chapados 1239135646 -0700 branch: Created from 2755fbad9 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/heads/master: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 a5070c0f18c3ed4d42d3d4d807220cfcb1d4e30b Brian Chapados 1239097381 -0700 fetch /Users/chapbr/repos/cocoagit master:master tag v0.2.5: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/heads/nu: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 b4783699e4fc54d98053f41404a0649ef17b4de2 Brian Chapados 1239295019 -0700 branch: Created from b4783699 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/heads/oberror: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 bc66bd7190cb032b47945c525b33ba52911b100d Brian Chapados 1239137520 -0700 branch: Created from bc66bd719 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/heads/sshchannel: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 91113f632534a201e7ccda8b0a3293024e07bbe7 Brian Chapados 1239294949 -0700 branch: Created from 91113f6325 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/remotes/geoffgarside/bottomup: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 b0c387cbb13ea1bf293eceaa58bb9c8a0629a2aa Brian Chapados 1239136553 -0700 fetch geoffgarside: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/remotes/geoffgarside/git-server: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 05c33f5a5feda92582ca0d0e191974dd106d29f3 Brian Chapados 1239136553 -0700 fetch geoffgarside: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/remotes/geoffgarside/macruby: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 f008a799de9023c710fb94030e41587018fc2c65 Brian Chapados 1239136553 -0700 fetch geoffgarside: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/remotes/geoffgarside/master: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 bdfe90051aa8334cb69bb763fd0cb0796150510c Brian Chapados 1239136553 -0700 fetch geoffgarside: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/remotes/geoffgarside/nserror: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 9bcacde3ebb46908cbee5ccdbfd03bcf3dadb6f5 Brian Chapados 1239136553 -0700 fetch geoffgarside: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/remotes/geoffgarside/oberror: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 b13ebeba8d2290cf9b3c951bb90726e66932234d Brian Chapados 1239136553 -0700 fetch geoffgarside: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/remotes/geoffgarside/uncrustify: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 7f81cc09fffd391db398a264f897bde559499af5 Brian Chapados 1239136553 -0700 fetch geoffgarside: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/logs/refs/remotes/github/master: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 a5070c0f18c3ed4d42d3d4d807220cfcb1d4e30b Brian Chapados 1239136454 -0700 fetch github: storing head 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/packed-refs: -------------------------------------------------------------------------------- 1 | # pack-refs with: peeled 2 | bdfe90051aa8334cb69bb763fd0cb0796150510c refs/heads/geoffgarside/master 3 | 9bcacde3ebb46908cbee5ccdbfd03bcf3dadb6f5 refs/heads/geoffgarside/nserror 4 | 2755fbad95adf007af7bb41a8bdaa8bcf538d0b5 refs/heads/ghunit 5 | a5070c0f18c3ed4d42d3d4d807220cfcb1d4e30b refs/heads/master 6 | b0c387cbb13ea1bf293eceaa58bb9c8a0629a2aa refs/remotes/geoffgarside/bottomup 7 | 05c33f5a5feda92582ca0d0e191974dd106d29f3 refs/remotes/geoffgarside/git-server 8 | f008a799de9023c710fb94030e41587018fc2c65 refs/remotes/geoffgarside/macruby 9 | bdfe90051aa8334cb69bb763fd0cb0796150510c refs/remotes/geoffgarside/master 10 | 9bcacde3ebb46908cbee5ccdbfd03bcf3dadb6f5 refs/remotes/geoffgarside/nserror 11 | b13ebeba8d2290cf9b3c951bb90726e66932234d refs/remotes/geoffgarside/oberror 12 | 7f81cc09fffd391db398a264f897bde559499af5 refs/remotes/geoffgarside/uncrustify 13 | a5070c0f18c3ed4d42d3d4d807220cfcb1d4e30b refs/remotes/github/master 14 | a5070c0f18c3ed4d42d3d4d807220cfcb1d4e30b refs/tags/10 15 | 41dc73228d8fd2598477b1d88a5b9efa35ae0719 refs/tags/annotated 16 | ^9202be1c77ff3e64bf9cec56bef11a9765e8c95b 17 | 9202be1c77ff3e64bf9cec56bef11a9765e8c95b refs/tags/not_annotated 18 | 37d9cba7a9d62a37f45678bd31442076d072adfe refs/tags/v0.1.0 19 | ^2be10e0df55792239e29e90a19016e2f631c0611 20 | 213dd8a011f09b66aa3d08387a691d02bb631933 refs/tags/v0.2.0 21 | ^c33712f3799b7190f151b1f5da7bc2c059c739ca 22 | b1073e4a84ec060e64b3e87fa97c769a18ba443f refs/tags/v0.2.5 23 | ^85f6ab303f8f6601377ce2d8ebcf186c4b5d7d68 24 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/refs/heads/facepalm: -------------------------------------------------------------------------------- 1 | fdb9468ea860f43bf1808b3f1e950ac3b53bc3c4 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/refs/heads/nu: -------------------------------------------------------------------------------- 1 | b4783699e4fc54d98053f41404a0649ef17b4de2 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/refs/heads/oberror: -------------------------------------------------------------------------------- 1 | bc66bd7190cb032b47945c525b33ba52911b100d 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/refs/heads/sshchannel: -------------------------------------------------------------------------------- 1 | 91113f632534a201e7ccda8b0a3293024e07bbe7 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/refs/remotes/github/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/remotes/github/master 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/dot_git_refs/refs/tags/facepalm: -------------------------------------------------------------------------------- 1 | 7ba7b3f03f769cbf2ae6a7e474c52b2d886e7b75 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/fixtures/refs2plist.nu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nush 2 | 3 | (set showRefs ((NSString stringWithShellCommand:"git show-ref --head") chomp)) 4 | (set refStrings (showRefs componentsSeparatedByCharactersInSet: 5 | (NSCharacterSet newlineCharacterSet))) 6 | 7 | (set refInfo (dict)) 8 | 9 | (refStrings each: 10 | (do (line) 11 | (set info (line componentsSeparatedByCharactersInSet: 12 | (NSCharacterSet whitespaceCharacterSet))) 13 | (set sha1 (info 0)) 14 | (set refName (info 1)) 15 | 16 | (if (refName isEqual:"HEAD") 17 | (then 18 | (set group "heads")) 19 | (else 20 | (set chunks (/\// splitString:refName)) 21 | (unless (> (chunks count) 2) (continue)) 22 | (unless ((chunks 0) isEqual:"refs") (continue)) 23 | (set group (chunks 1)))) 24 | 25 | ; (set nameLength (- (chunks count) 2)) 26 | ; (set nameList (chunks subarrayWithRange:(list 2 nameLength))) 27 | ; (set shortName (nameList componentsJoinedByString:"/")) 28 | (set name refName) 29 | 30 | (unless (refInfo group) 31 | (refInfo setValue:(dict) forKey:group)) 32 | (set groupInfo (refInfo group)) 33 | (unless (groupInfo name) 34 | (groupInfo setValue:sha1 forKey:name) 35 | (refInfo setValue:groupInfo forKey:group)))) 36 | 37 | (refInfo writeToFile:"refFixtures.plist" atomically:NO) 38 | 39 | -------------------------------------------------------------------------------- /UnitTests/Resources/fixtures/revlist-fixtures.nu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nush 2 | # 3 | # Generate fixture .plist files containing arrays 4 | # of commit-sha1 orders output from git-rev-list commands 5 | # 6 | # copyright 2009, Brian Chapados 7 | # 8 | 9 | # Background: 10 | # The revwalk-test branch in the 'dot_git' bare repo contains 11 | # a commit tree that will produce uniquely ordered output for 12 | # the default, --date-order and --topo-order options to git-rev-list 13 | # 14 | 15 | (set repoDir "../dot_git") 16 | (set branch "revwalk-test") 17 | (set revList "git-rev-list") 18 | 19 | (set optionsMap (dict "default" "" 20 | "date" "--date-order" 21 | "topo" "--topo-order")) 22 | 23 | (set commitLists (dict)) 24 | (optionsMap each: 25 | (do (name options) 26 | (set output 27 | ((NSString stringWithShellCommand:"cd #{repoDir} && #{revList} #{options} #{branch}") chomp)) 28 | (commitLists setValue:(/\n/ splitString:output) forKey:name))) 29 | 30 | (puts (commitLists description)) 31 | ;(commitLists writeToFile:"../fixtures/revListFixtures.plist" atomically:YES) 32 | (commitLists writeToFile:"revListFixtures.plist" atomically:YES) 33 | -------------------------------------------------------------------------------- /UnitTests/Resources/packs/cg-0.2.5-deltaofs-be5a15ac583f7ed1e431f03bd444bbde6511e57c.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/packs/cg-0.2.5-deltaofs-be5a15ac583f7ed1e431f03bd444bbde6511e57c.idx -------------------------------------------------------------------------------- /UnitTests/Resources/packs/cg-0.2.5-deltaofs-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/packs/cg-0.2.5-deltaofs-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack -------------------------------------------------------------------------------- /UnitTests/Resources/packs/cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/packs/cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.idx -------------------------------------------------------------------------------- /UnitTests/Resources/packs/cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/packs/cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack -------------------------------------------------------------------------------- /UnitTests/Resources/packs/cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.v1.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/packs/cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.v1.idx -------------------------------------------------------------------------------- /UnitTests/Resources/packs/pack-dump.nuke: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nush 2 | 3 | (load "match") 4 | 5 | (set deltaref_packfile "packs/cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack") 6 | (set deltaofs_packfile "packs/cg-0.2.5-deltaofs-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack") 7 | 8 | (file "deltaref-packdump.txt" => deltaref_packfile is 9 | (set s (NSString stringWithShellCommand: 10 | "git-verify-pack -v #{deltaref_packfile} | grep -v ^chain | grep -v ^packs")) 11 | (s writeToFile:(target name) 12 | atomically:NO 13 | encoding:NSUTF8StringEncoding 14 | error:nil)) 15 | 16 | (class NSArray 17 | (- (id) zip:(id)otherArray is 18 | (set a (NSMutableArray arrayWithCapacity:(self count))) 19 | (self eachWithIndex:(do (e i) 20 | (set d (NSDictionary dictionaryWithObject:(otherArray i) forKey:e)) 21 | (a addObject:d))) 22 | a)) 23 | 24 | (file "deltaRefDump.plist" => "deltaref-packdump.txt" is 25 | (set dumpString (NSString stringWithContentsOfFile:"deltaref-packdump.txt")) 26 | (set lines ((dumpString chomp) componentsSeparatedByCharactersInSet: 27 | (NSCharacterSet newlineCharacterSet))) 28 | (puts "#{(lines count)} lines") 29 | (set normal_headers (array "sha1" "type" "size" "sizeInPackFile" "offsetInPackfile")) 30 | (set delta_headers (normal_headers arrayByAddingObjectsFromArray:(array "depth" "baseSha1"))) 31 | ;(puts (lines list)) 32 | (set data 33 | (lines map: 34 | (do (line) 35 | (set values (/\W+/ splitString:(line chomp))) 36 | (if (eq 5 (values count)) 37 | (then 38 | (normal_headers zip:values)) 39 | (else 40 | (delta_headers zip:values)))))) 41 | (data writeToFile:(target name) atomically:NO)) 42 | 43 | 44 | (task "default" => "deltaRefDump.plist") -------------------------------------------------------------------------------- /UnitTests/Resources/packs/pack-fixtures.nu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nush 2 | # 3 | # pack-info.nu 4 | # 5 | # generate an XML property list file containing information 6 | # about objects in the pack files used for testing. 7 | # 8 | # copyright 2009, Brian Chapados 9 | # 10 | 11 | #--- Add data below ---# 12 | 13 | ; these are valid for the delta-ref packfile 14 | (set packFixtures 15 | '((rawBlob (sha1:"e83483aee3acd1ed7e268f524feaccefc20dd9e7")) 16 | (deltifiedBlob (sha1:"dad7275d1d9c17b81ffab9a61cfd48c940aaf994")) 17 | (deltifiedBlobXO (sha1:"da26259c7057cedc6552071f1fc51b430e01fab4")) 18 | (rawTree (sha1:"d00160399d71034078fd8ea531a6739f321b369b")) 19 | (deltifiedTree (sha1:"dc493b818cbbf489bf5e6dfa793fc991df4fc078")) 20 | (deltifiedTreeXO (sha1:"fac337c337d0dc53a61360daad8f18b632066460")) 21 | (firstObject (sha1:"85f6ab303f8f6601377ce2d8ebcf186c4b5d7d68" 22 | offset:12)) 23 | (lastNormalObject (sha1:"8c9db88c17479d4663658fd9321e095ea2c4a690" 24 | offset:299902)) 25 | (penultimateObject (sha1:"5cf8773ba4c007845873e3d8b23d406652a1f8c4" 26 | offset:332809)) 27 | (lastObject (sha1:"a01ba8491691058a072cbb4b12acce1d54801e22" 28 | offset:332902)))) 29 | 30 | #--- Should not need to edit below this line --- 31 | 32 | (function fixtures-dictionary (fixtures_description) 33 | (fixtures_description reduce: 34 | (do (d f) 35 | (set name (car f)) 36 | (set info (car (cdr f))) 37 | (d setValue:(NSDictionary dictionaryWithList:info) 38 | forKey:(name stringValue)) 39 | d) 40 | from:(NSMutableDictionary new))) 41 | 42 | (puts ((fixtures-dictionary packFixtures) description)) 43 | (if ((fixtures-dictionary packFixtures) writeToFile:"packFixtures.plist" atomically:NO) 44 | (then 45 | (puts "Generated packFixtures.plist")) 46 | (else 47 | (puts "ERROR: packFixtures.plist was not written"))) 48 | -------------------------------------------------------------------------------- /UnitTests/Resources/packs/packFixtures.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | deltifiedBlob 6 | 7 | sha1 8 | dad7275d1d9c17b81ffab9a61cfd48c940aaf994 9 | 10 | deltifiedBlobXO 11 | 12 | sha1 13 | da26259c7057cedc6552071f1fc51b430e01fab4 14 | 15 | deltifiedTree 16 | 17 | sha1 18 | dc493b818cbbf489bf5e6dfa793fc991df4fc078 19 | 20 | deltifiedTreeXO 21 | 22 | sha1 23 | fac337c337d0dc53a61360daad8f18b632066460 24 | 25 | firstObject 26 | 27 | offset 28 | 12 29 | sha1 30 | 85f6ab303f8f6601377ce2d8ebcf186c4b5d7d68 31 | 32 | lastNormalObject 33 | 34 | offset 35 | 299902 36 | sha1 37 | 8c9db88c17479d4663658fd9321e095ea2c4a690 38 | 39 | lastObject 40 | 41 | offset 42 | 332902 43 | sha1 44 | a01ba8491691058a072cbb4b12acce1d54801e22 45 | 46 | penultimateObject 47 | 48 | offset 49 | 332809 50 | sha1 51 | 5cf8773ba4c007845873e3d8b23d406652a1f8c4 52 | 53 | rawBlob 54 | 55 | sha1 56 | e83483aee3acd1ed7e268f524feaccefc20dd9e7 57 | 58 | rawTree 59 | 60 | sha1 61 | d00160399d71034078fd8ea531a6739f321b369b 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Test HTML file 5 | 6 | 7 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/COMMIT_EDITMSG: -------------------------------------------------------------------------------- 1 | Merge branch 'branch3' into revwalk-merge 2 | 3 | Conflicts: 4 | 5 | revwalk.txt 6 | # 7 | # It looks like you may be committing a MERGE. 8 | # If this is not correct, please remove the file 9 | # /Users/chapbr/repos/cocoagit/UnitTests/Resources/tr/.git/MERGE_HEAD 10 | # and try again. 11 | # 12 | 13 | # Please enter the commit message for your changes. 14 | # (Comment lines starting with '#' will not be included) 15 | # On branch revwalk-merge 16 | # Changes to be committed: 17 | # (use "git reset HEAD ..." to unstage) 18 | # 19 | # modified: revwalk.txt 20 | # 21 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/ruby 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/ORIG_HEAD: -------------------------------------------------------------------------------- 1 | f85a47c40f8de414905e93e907920e8c16f6e572 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file to name it for gitweb. 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/hooks/applypatch-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message taken by 4 | # applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. The hook is 8 | # allowed to edit the commit message file. 9 | # 10 | # To enable this hook, make this file executable. 11 | 12 | . git-sh-setup 13 | test -x "$GIT_DIR/hooks/commit-msg" && 14 | exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} 15 | : 16 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/hooks/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message. 4 | # Called by git-commit with one argument, the name of the file 5 | # that has the commit message. The hook should exit with non-zero 6 | # status after issuing an appropriate message if it wants to stop the 7 | # commit. The hook is allowed to edit the commit message file. 8 | # 9 | # To enable this hook, make this file executable. 10 | 11 | # Uncomment the below to add a Signed-off-by line to the message. 12 | # Doing this in a hook is a bad idea in general, but the prepare-commit-msg 13 | # hook is more suited to it. 14 | # 15 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 16 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 17 | 18 | # This example catches duplicate Signed-off-by lines. 19 | 20 | test "" = "$(grep '^Signed-off-by: ' "$1" | 21 | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { 22 | echo >&2 Duplicate Signed-off-by lines. 23 | exit 1 24 | } 25 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/hooks/post-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script that is called after a successful 4 | # commit is made. 5 | # 6 | # To enable this hook, make this file executable. 7 | 8 | : Nothing 9 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/hooks/post-receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script for the post-receive event 4 | # 5 | # This script is run after receive-pack has accepted a pack and the 6 | # repository has been updated. It is passed arguments in through stdin 7 | # in the form 8 | # 9 | # For example: 10 | # aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master 11 | # 12 | # see contrib/hooks/ for an sample, or uncomment the next line (on debian) 13 | # 14 | 15 | 16 | #. /usr/share/doc/git-core/contrib/hooks/post-receive-email 17 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/hooks/post-update: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare a packed repository for use over 4 | # dumb transports. 5 | # 6 | # To enable this hook, make this file executable by "chmod +x post-update". 7 | 8 | exec git-update-server-info 9 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/hooks/pre-applypatch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed 4 | # by applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. 8 | # 9 | # To enable this hook, make this file executable. 10 | 11 | . git-sh-setup 12 | test -x "$GIT_DIR/hooks/pre-commit" && 13 | exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} 14 | : 15 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed. 4 | # Called by git-commit with no arguments. The hook should 5 | # exit with non-zero status after issuing an appropriate message if 6 | # it wants to stop the commit. 7 | # 8 | # To enable this hook, make this file executable. 9 | 10 | # This is slightly modified from Andrew Morton's Perfect Patch. 11 | # Lines you introduce should not have trailing whitespace. 12 | # Also check for an indentation that has SP before a TAB. 13 | 14 | if git-rev-parse --verify HEAD 2>/dev/null 15 | then 16 | git-diff-index -p -M --cached HEAD -- 17 | else 18 | # NEEDSWORK: we should produce a diff with an empty tree here 19 | # if we want to do the same verification for the initial import. 20 | : 21 | fi | 22 | perl -e ' 23 | my $found_bad = 0; 24 | my $filename; 25 | my $reported_filename = ""; 26 | my $lineno; 27 | sub bad_line { 28 | my ($why, $line) = @_; 29 | if (!$found_bad) { 30 | print STDERR "*\n"; 31 | print STDERR "* You have some suspicious patch lines:\n"; 32 | print STDERR "*\n"; 33 | $found_bad = 1; 34 | } 35 | if ($reported_filename ne $filename) { 36 | print STDERR "* In $filename\n"; 37 | $reported_filename = $filename; 38 | } 39 | print STDERR "* $why (line $lineno)\n"; 40 | print STDERR "$filename:$lineno:$line\n"; 41 | } 42 | while (<>) { 43 | if (m|^diff --git a/(.*) b/\1$|) { 44 | $filename = $1; 45 | next; 46 | } 47 | if (/^@@ -\S+ \+(\d+)/) { 48 | $lineno = $1 - 1; 49 | next; 50 | } 51 | if (/^ /) { 52 | $lineno++; 53 | next; 54 | } 55 | if (s/^\+//) { 56 | $lineno++; 57 | chomp; 58 | if (/\s$/) { 59 | bad_line("trailing whitespace", $_); 60 | } 61 | if (/^\s* \t/) { 62 | bad_line("indent SP followed by a TAB", $_); 63 | } 64 | if (/^([<>])\1{6} |^={7}$/) { 65 | bad_line("unresolved merge conflict", $_); 66 | } 67 | } 68 | } 69 | exit($found_bad); 70 | ' 71 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/hooks/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare the commit log message. 4 | # Called by git-commit with the name of the file that has the 5 | # commit message, followed by the description of the commit 6 | # message's source. The hook's purpose is to edit the commit 7 | # message file. If the hook fails with a non-zero status, 8 | # the commit is aborted. 9 | # 10 | # To enable this hook, make this file executable. 11 | 12 | # This hook includes three examples. The first comments out the 13 | # "Conflicts:" part of a merge commit. 14 | # 15 | # The second includes the output of "git diff --name-status -r" 16 | # into the message, just before the "git status" output. It is 17 | # commented because it doesn't cope with --amend or with squashed 18 | # commits. 19 | # 20 | # The third example adds a Signed-off-by line to the message, that can 21 | # still be edited. This is rarely a good idea. 22 | 23 | case "$2 $3" in 24 | merge) 25 | sed -i '/^Conflicts:/,/#/!b;s/^/# &/;s/^# #/#/' "$1" ;; 26 | 27 | # ""|template) 28 | # perl -i -pe ' 29 | # print "\n" . `git diff --cached --name-status -r` 30 | # if /^#/ && $first++ == 0' "$1" ;; 31 | 32 | *) ;; 33 | esac 34 | 35 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 36 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 37 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/index -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/info/exclude: -------------------------------------------------------------------------------- 1 | # git-ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/info/refs: -------------------------------------------------------------------------------- 1 | f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5 refs/heads/master 2 | d8094720229e2975cc639b028f56602baa6f8715 refs/heads/ruby 3 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/logs/refs/heads/branch1: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 8c2a16604844b7762fd6545339693cfe822cc75b Brian Chapados 1241125596 -0700 branch: Created from HEAD 2 | 8c2a16604844b7762fd6545339693cfe822cc75b a7959d4a69d6771b26c9c2090ccadd35b81d5387 Brian Chapados 1241125650 -0700 commit: Added a line 3 | a7959d4a69d6771b26c9c2090ccadd35b81d5387 34d90f9fea9734ebea38a3349713de9c7ddc9102 Brian Chapados 1241125728 -0700 commit: reformat and add a second line 4 | 34d90f9fea9734ebea38a3349713de9c7ddc9102 12e183104e82db8cc7fd3b17a69aec46fb1d9487 Brian Chapados 1241126364 -0700 commit: add line3 5 | 12e183104e82db8cc7fd3b17a69aec46fb1d9487 6cbe32dc1cfd3ca776760c8c862006319460e271 Brian Chapados 1241132002 -0700 commit: remove line 3 6 | 6cbe32dc1cfd3ca776760c8c862006319460e271 1dba503f40006d1d89552b4dc8a25dc1a6a4e013 Brian Chapados 1241128628 -0700 commit: add line 3 again 7 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/logs/refs/heads/branch2: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 8c2a16604844b7762fd6545339693cfe822cc75b Brian Chapados 1241125811 -0700 branch: Created from HEAD 2 | 8c2a16604844b7762fd6545339693cfe822cc75b c4316dabeac43115f00be867fd22426f54d5040f Brian Chapados 1241125835 -0700 commit: content is meaningless 3 | c4316dabeac43115f00be867fd22426f54d5040f 06a42c6a5c76120e9adc7d5efd79d9c9eaef936f Brian Chapados 1241125881 -0700 commit: not worth reading 4 | 06a42c6a5c76120e9adc7d5efd79d9c9eaef936f b9237bcb41c35873521545f3e0bbc825ea847d84 Brian Chapados 1241125927 -0700 commit: move along 5 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/logs/refs/heads/branch3: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 8c2a16604844b7762fd6545339693cfe822cc75b Brian Chapados 1241128859 -0700 branch: Created from HEAD 2 | 8c2a16604844b7762fd6545339693cfe822cc75b 3135253e5dd7ab4fc53e72bb1192887c3e437574 Brian Chapados 1241128887 -0700 commit: added blank lines... 3 | 3135253e5dd7ab4fc53e72bb1192887c3e437574 7d68b1f916cfc73c2771bd3282a4f913f767bae2 Brian Chapados 1241122443 -0700 commit: add ellipsis 4 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/logs/refs/heads/master: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 2bb318d2c722b344f6fae8ec274d0c7df9020544 Brian Chapados 1224730175 -0700 commit (initial): Added hello world message 2 | 2bb318d2c722b344f6fae8ec274d0c7df9020544 f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5 Brian Chapados 1224730970 -0700 commit: removed bang, added goodbye message. 3 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/logs/refs/heads/revwalk: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5 Brian Chapados 1241125508 -0700 branch: Created from master 2 | f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5 8c2a16604844b7762fd6545339693cfe822cc75b Brian Chapados 1241125583 -0700 commit: Add revwalk.txt 3 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/logs/refs/heads/revwalk-test: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 1b06b417010400c92a4d9b840f136315fd83430e Brian Chapados 1241129883 -0700 branch: Created from revwalk-merge 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/logs/refs/heads/ruby: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5 Brian Chapados 1224735230 -0700 branch: Created from HEAD 2 | f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5 5543323c6b02f4fb30940f780c4431d32829e76b Brian Chapados 1224735294 -0700 commit: convert hello.txt into a ruby script 3 | 5543323c6b02f4fb30940f780c4431d32829e76b 3ca188481c60fe3f0a1a60f500a26710a5961593 Brian Chapados 1224735329 -0700 commit: renamed to hello.rb 4 | 3ca188481c60fe3f0a1a60f500a26710a5961593 d8094720229e2975cc639b028f56602baa6f8715 Brian Chapados 1224735915 -0700 commit: added docs directory for fake HTML docs 5 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/04/f612c594705792ee5c9cb6770cb926f820745e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/04/f612c594705792ee5c9cb6770cb926f820745e -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/06/a42c6a5c76120e9adc7d5efd79d9c9eaef936f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/06/a42c6a5c76120e9adc7d5efd79d9c9eaef936f -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/08/714c9842200451c582ab035ec16c16fffaf908: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/08/714c9842200451c582ab035ec16c16fffaf908 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/0d/7696b4c809b22949fac121f0db427dc6099ce5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/0d/7696b4c809b22949fac121f0db427dc6099ce5 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/10/3f361dd2c9df04c07cd1135433378852a44e32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/10/3f361dd2c9df04c07cd1135433378852a44e32 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/10/e19ae4b43d07b757beee214eeadcaad2502562: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/10/e19ae4b43d07b757beee214eeadcaad2502562 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/11/49d003e24c0794751ba34cbbca6dc562dfdf9b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/11/49d003e24c0794751ba34cbbca6dc562dfdf9b -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/12/e183104e82db8cc7fd3b17a69aec46fb1d9487: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/12/e183104e82db8cc7fd3b17a69aec46fb1d9487 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/1b/06b417010400c92a4d9b840f136315fd83430e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/1b/06b417010400c92a4d9b840f136315fd83430e -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/1b/91aa304c105a96746a7ffa267ac82e99480dd0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/1b/91aa304c105a96746a7ffa267ac82e99480dd0 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/1d/ba503f40006d1d89552b4dc8a25dc1a6a4e013: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/1d/ba503f40006d1d89552b4dc8a25dc1a6a4e013 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/1e/fdc251e26c6d408d7df8ebbc953a228c79afa1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/1e/fdc251e26c6d408d7df8ebbc953a228c79afa1 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/22/6e91f3b4cca13890325f5d33ec050beca99f89: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/22/6e91f3b4cca13890325f5d33ec050beca99f89 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/22/fe0f5e3f062c500c1b2076acef7fed43a32084: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/22/fe0f5e3f062c500c1b2076acef7fed43a32084 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/24/e8a3b08ebe2162aa90bbb7702a3c5189335dc6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/24/e8a3b08ebe2162aa90bbb7702a3c5189335dc6 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/24/f1a3f184cada0b9f4f389d482061975dc0c23c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/24/f1a3f184cada0b9f4f389d482061975dc0c23c -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/25/793ba675da6ef31eb6aa43328467dd8db2a3bf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/25/793ba675da6ef31eb6aa43328467dd8db2a3bf -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/28/5c37cc39a59bf80140f7e488cfc10e01ab02c6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/28/5c37cc39a59bf80140f7e488cfc10e01ab02c6 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/2b/b318d2c722b344f6fae8ec274d0c7df9020544: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/2b/b318d2c722b344f6fae8ec274d0c7df9020544 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/31/35253e5dd7ab4fc53e72bb1192887c3e437574: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/31/35253e5dd7ab4fc53e72bb1192887c3e437574 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/34/d90f9fea9734ebea38a3349713de9c7ddc9102: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/34/d90f9fea9734ebea38a3349713de9c7ddc9102 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/36/bc27f9730d6e142251537ce8f00f00916c4510: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/36/bc27f9730d6e142251537ce8f00f00916c4510 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/3c/a188481c60fe3f0a1a60f500a26710a5961593: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/3c/a188481c60fe3f0a1a60f500a26710a5961593 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/41/0f428a7effbe61254b5b36611d37aac160736b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/41/0f428a7effbe61254b5b36611d37aac160736b -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/41/e234c127cac1b154ba070c208b4f7bf390a744: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/41/e234c127cac1b154ba070c208b4f7bf390a744 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/45/f55f811d43dd9a1358458034d4400a408c711c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/45/f55f811d43dd9a1358458034d4400a408c711c -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/55/43323c6b02f4fb30940f780c4431d32829e76b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/55/43323c6b02f4fb30940f780c4431d32829e76b -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/5b/e456aea74a055c376a271e14c14f60d97cb68c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/5b/e456aea74a055c376a271e14c14f60d97cb68c -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/65/6af6710f7e2420bd2530d1c53822d1458646a2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/65/6af6710f7e2420bd2530d1c53822d1458646a2 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/6c/be32dc1cfd3ca776760c8c862006319460e271: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/6c/be32dc1cfd3ca776760c8c862006319460e271 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/74/5420bbf194392f22694e68f7cdd41234c35f4e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/74/5420bbf194392f22694e68f7cdd41234c35f4e -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/78/d245f1a50bfd53821f70bf211d252fe9884d86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/78/d245f1a50bfd53821f70bf211d252fe9884d86 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/7a/fb4770045be464c04b3a6f9cf2dd4e6432a6b7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/7a/fb4770045be464c04b3a6f9cf2dd4e6432a6b7 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/7c/60eee9a2238b1de8a1bdfe7e607e72a00fba4d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/7c/60eee9a2238b1de8a1bdfe7e607e72a00fba4d -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/7d/68b1f916cfc73c2771bd3282a4f913f767bae2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/7d/68b1f916cfc73c2771bd3282a4f913f767bae2 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/86/0204d1ca9f7e50ba9949aa76117895b5b1a136: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/86/0204d1ca9f7e50ba9949aa76117895b5b1a136 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/87/f974580d485f3cfd5fd9cc62491341067f0c59: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/87/f974580d485f3cfd5fd9cc62491341067f0c59 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/8c/2a16604844b7762fd6545339693cfe822cc75b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/8c/2a16604844b7762fd6545339693cfe822cc75b -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/8e/065cdc3e97c1d77a19d519d72e8e02010b1e83: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/8e/065cdc3e97c1d77a19d519d72e8e02010b1e83 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/8f/6c301d8bfe4c0cc3d8670955f82f872f39f5a3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/8f/6c301d8bfe4c0cc3d8670955f82f872f39f5a3 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/90/74e33cdc6bf858efb14922770e75f4a3eb5628: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/90/74e33cdc6bf858efb14922770e75f4a3eb5628 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/9c/3e26256583d93113e272024e6711fd477429df: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/9c/3e26256583d93113e272024e6711fd477429df -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/a0/336d66110dbe7efd1845517e5a510a78d19db9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/a0/336d66110dbe7efd1845517e5a510a78d19db9 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/a3/672be369df28ba4d75141d8c3a10ee3fcabffa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/a3/672be369df28ba4d75141d8c3a10ee3fcabffa -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/a4/c0e695258d0ac4cbcbd33177d42dada3185623: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/a4/c0e695258d0ac4cbcbd33177d42dada3185623 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/a7/959d4a69d6771b26c9c2090ccadd35b81d5387: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/a7/959d4a69d6771b26c9c2090ccadd35b81d5387 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/a9/ecfd8989d7c427c5564cf918b264261866ce01: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/a9/ecfd8989d7c427c5564cf918b264261866ce01 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/ac/694533945c766d9d4e9ad36c3d15ad943b61db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/ac/694533945c766d9d4e9ad36c3d15ad943b61db -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/b8/ea533af44f544877babe0aaabc1d7f3ed2593f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/b8/ea533af44f544877babe0aaabc1d7f3ed2593f -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/b9/237bcb41c35873521545f3e0bbc825ea847d84: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/b9/237bcb41c35873521545f3e0bbc825ea847d84 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/c4/316dabeac43115f00be867fd22426f54d5040f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/c4/316dabeac43115f00be867fd22426f54d5040f -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/c7/83b29bcb9adefa70ed141aabf066f9f1c3beda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/c7/83b29bcb9adefa70ed141aabf066f9f1c3beda -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/cd/1b673074ab3f84a354929a99d1cc6e1eb5ef53: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/cd/1b673074ab3f84a354929a99d1cc6e1eb5ef53 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/d1/094a69e97b36db6ebf7142489d0a7402fdb124: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/d1/094a69e97b36db6ebf7142489d0a7402fdb124 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/d4/a7449cb88ad9fe6f6ab334b3fd3f569a9f35a0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/d4/a7449cb88ad9fe6f6ab334b3fd3f569a9f35a0 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/d8/094720229e2975cc639b028f56602baa6f8715: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/d8/094720229e2975cc639b028f56602baa6f8715 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/dc/5c47bc4259f7d16e8625225a15d78ee90560c1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/dc/5c47bc4259f7d16e8625225a15d78ee90560c1 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/e2/52da6072a2f887a1f0165177ec068baf566d0e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/e2/52da6072a2f887a1f0165177ec068baf566d0e -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/e8/c378f20149cd520f99d32b164f181e68dd6588: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/e8/c378f20149cd520f99d32b164f181e68dd6588 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/e8/e796b690324f705757ea9c3f9a62e94e026257: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/e8/e796b690324f705757ea9c3f9a62e94e026257 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/f3/fbea20d8078597678c4d451a57a182114387c6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/f3/fbea20d8078597678c4d451a57a182114387c6 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/f7/e7e7d240ccdae143b064aa7467eb2fa91aa8a5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/f7/e7e7d240ccdae143b064aa7467eb2fa91aa8a5 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/f8/474afb42704352dcd37751c15ae68d7d21fbc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/f8/474afb42704352dcd37751c15ae68d7d21fbc2 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/f8/5a47c40f8de414905e93e907920e8c16f6e572: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/f8/5a47c40f8de414905e93e907920e8c16f6e572 -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/info/packs: -------------------------------------------------------------------------------- 1 | P pack-709b858145841a007ab0c53e130630fd1eecea6f.pack 2 | 3 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/pack/pack-709b858145841a007ab0c53e130630fd1eecea6f.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/pack/pack-709b858145841a007ab0c53e130630fd1eecea6f.idx -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/objects/pack/pack-709b858145841a007ab0c53e130630fd1eecea6f.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoffgarside/cocoagit/6cbf18b637ac600d4b57e965f8ff1998c742ad9d/UnitTests/Resources/test_repo/dot_git_dir/objects/pack/pack-709b858145841a007ab0c53e130630fd1eecea6f.pack -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/refs/heads/branch1: -------------------------------------------------------------------------------- 1 | 1dba503f40006d1d89552b4dc8a25dc1a6a4e013 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/refs/heads/branch2: -------------------------------------------------------------------------------- 1 | b9237bcb41c35873521545f3e0bbc825ea847d84 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/refs/heads/branch3: -------------------------------------------------------------------------------- 1 | 7d68b1f916cfc73c2771bd3282a4f913f767bae2 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/refs/heads/master: -------------------------------------------------------------------------------- 1 | f7e7e7d240ccdae143b064aa7467eb2fa91aa8a5 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/refs/heads/revwalk: -------------------------------------------------------------------------------- 1 | 8c2a16604844b7762fd6545339693cfe822cc75b 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/refs/heads/revwalk-test: -------------------------------------------------------------------------------- 1 | 1b06b417010400c92a4d9b840f136315fd83430e 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/dot_git_dir/refs/heads/ruby: -------------------------------------------------------------------------------- 1 | d8094720229e2975cc639b028f56602baa6f8715 2 | -------------------------------------------------------------------------------- /UnitTests/Resources/test_repo/hello.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | puts "hello world!" 4 | 5 | puts "goodbye world." 6 | -------------------------------------------------------------------------------- /UnitTests/Source/GITActorTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITActorTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @class GITActor; 12 | @interface GITActorTests : GHTestCase { 13 | 14 | } 15 | 16 | - (void)testShouldInitWithName; 17 | - (void)testShouldInitWithNameAndEmail; 18 | - (void)testShouldFormatNameAndEmailInDescription; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /UnitTests/Source/GITActorTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITActorTests.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITActorTests.h" 10 | #import "GITActor.h" 11 | 12 | @implementation GITActorTests 13 | 14 | - (void)testShouldInitWithName 15 | { 16 | GITActor * actor = [GITActor actorWithName:@"Enoch Root"]; 17 | GHAssertEqualObjects(actor.name, @"Enoch Root", nil); 18 | } 19 | - (void)testShouldInitWithNameAndEmail 20 | { 21 | GITActor * actor = [GITActor actorWithName:@"Enoch Root" email:@"root@example.com"]; 22 | 23 | GHAssertEqualObjects(actor.name, @"Enoch Root", nil); 24 | GHAssertEqualObjects(actor.email, @"root@example.com", nil); 25 | } 26 | - (void)testShouldFormatNameAndEmailInDescription 27 | { 28 | GITActor * actor = [[GITActor alloc] initWithName:@"Enoch Root" email:@"root@example.com"]; 29 | 30 | GHAssertEqualObjects([actor description], @"Enoch Root ", nil); 31 | [actor release]; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /UnitTests/Source/GITBlobTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITBlobTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @class GITRepo, GITBlob; 12 | @interface GITBlobTests : GHTestCase { 13 | GITRepo * repo; 14 | GITBlob * blob; 15 | NSString * blobSHA1; 16 | } 17 | 18 | @property(readwrite,retain) GITRepo * repo; 19 | @property(readwrite,retain) GITBlob * blob; 20 | @property(readwrite,copy) NSString * blobSHA1; 21 | 22 | - (void)testShouldNotBeNil; 23 | - (void)testSha1HashesAreEqual; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /UnitTests/Source/GITBlobTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITBlobTests.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITBlobTests.h" 10 | #import "GITRepo.h" 11 | #import "GITBlob.h" 12 | 13 | @implementation GITBlobTests 14 | @synthesize repo; 15 | @synthesize blob; 16 | @synthesize blobSHA1; 17 | 18 | - (void)setUp 19 | { 20 | [super setUp]; 21 | self.repo = [[[GITRepo alloc] initWithRoot:DOT_GIT bare:YES] autorelease]; 22 | self.blobSHA1 = @"87f974580d485f3cfd5fd9cc62491341067f0c59"; 23 | self.blob = [repo blobWithSha1:blobSHA1]; 24 | } 25 | - (void)tearDown 26 | { 27 | self.repo = nil; 28 | self.blobSHA1 = nil; 29 | self.blob = nil; 30 | [super tearDown]; 31 | } 32 | 33 | - (void)testShouldNotBeNil 34 | { 35 | GHAssertNotNil(blob, @"Blob should be created"); 36 | } 37 | 38 | - (void)testSha1HashesAreEqual 39 | { 40 | GHAssertEqualObjects(blob.sha1, blobSHA1, @"SHA1 hashes should be equal"); 41 | } 42 | 43 | - (void)testRawContent 44 | { 45 | NSData *theData; 46 | GITObjectType theType; 47 | [self.repo loadObjectWithSha1:self.blobSHA1 intoData:&theData type:&theType error:NULL]; 48 | GHAssertEqualObjects([self.blob rawContent], theData, nil); 49 | } 50 | 51 | - (void)testRawData 52 | { 53 | NSData *rawData = [self.repo dataWithContentsOfObject:self.blobSHA1]; 54 | GHAssertEqualObjects([self.blob rawData], rawData, nil); 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /UnitTests/Source/GITCombinedStoreTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITCombinedStoreTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 27/12/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @class GITCombinedStore; 12 | @interface GITCombinedStoreTests : GHTestCase { 13 | GITCombinedStore * store; 14 | } 15 | 16 | @property(readwrite,retain) GITCombinedStore * store; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /UnitTests/Source/GITCommitTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITCommitTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @class GITRepo, GITCommit; 12 | @interface GITCommitTests : GHTestCase { 13 | GITRepo * repo; 14 | GITCommit * commit; 15 | NSString * commitSHA1; 16 | GITCommit * firstCommit; 17 | NSString * firstCommitSha1; 18 | } 19 | 20 | @property(readwrite,retain) GITRepo * repo; 21 | @property(readwrite,retain) GITCommit * commit; 22 | @property(readwrite,copy) NSString * commitSHA1; 23 | @property(readwrite,retain) GITCommit * firstCommit; 24 | @property(readwrite,copy) NSString * firstCommitSha1; 25 | 26 | - (void)testIsNotNil; 27 | - (void)testSha1MatchesInitialSha1; 28 | - (void)testAuthorIsNotNil; 29 | - (void)testAuthoredIsNotNil; 30 | - (void)testCommitterIsNotNil; 31 | - (void)testCommittedIsNotNil; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /UnitTests/Source/GITDateTimeTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITDateTimeTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 07/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @interface GITDateTimeTests : GHTestCase { 12 | 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /UnitTests/Source/GITFileStoreTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITFileStoreTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 13/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @class GITFileStore; 12 | @interface GITFileStoreTests : GHTestCase { 13 | GITFileStore * store; 14 | } 15 | 16 | @property(readwrite,retain) GITFileStore * store; 17 | 18 | - (void)testStoreRootIsCorrect; 19 | - (void)testExpandHashIntoFilePath; 20 | - (void)testDataWithContentsOfObject; 21 | - (void)testLoadObjectWithSha1; 22 | @end 23 | -------------------------------------------------------------------------------- /UnitTests/Source/GITGraphTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITGraphTests.h 3 | // CocoaGit 4 | // 5 | // Created by chapbr on 4/23/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @class GITRepo, GITGraph; 12 | @interface GITGraphTests : GHTestCase { 13 | GITRepo *repo; 14 | GITGraph *graph; 15 | } 16 | @property(readwrite,retain) GITRepo *repo; 17 | @property(readwrite,retain) GITGraph *graph; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /UnitTests/Source/GITPackFileTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITPackFileTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 02/12/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | #import "GITPackFile.h" 11 | 12 | @interface GITPackFileTests : GHTestCase { 13 | GITPackFile * versionTwo; 14 | } 15 | 16 | @property(readwrite,retain) GITPackFile * versionTwo; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /UnitTests/Source/GITPackFileTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITPackFileTests.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 02/12/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITPackFileTests.h" 10 | 11 | @implementation GITPackFileTests 12 | @synthesize versionTwo; 13 | 14 | - (void)setUp 15 | { 16 | [super setUp]; 17 | self.versionTwo = [GITPackFile packFileWithPath:DELTA_REF_PACK]; 18 | } 19 | - (void)tearDown 20 | { 21 | self.versionTwo = nil; 22 | [super tearDown]; 23 | } 24 | - (void)testVersionTwoIsNotNil 25 | { 26 | GHAssertNotNil(versionTwo, nil); 27 | } 28 | - (void)testVersionInVersionTwo 29 | { 30 | GHAssertEquals([versionTwo version], (NSUInteger)2, nil); 31 | } 32 | - (void)testChecksumInVersionTwo 33 | { 34 | GHAssertEqualObjects([versionTwo checksumString], @"30c9a070ff5dcb64b5fd20337e3793407ecbfe66", nil); 35 | } 36 | - (void)testChecksumVerifiesInVersionTwo 37 | { 38 | GHAssertTrue([versionTwo verifyChecksum], nil); 39 | } 40 | - (void)testNumberOfObjectsInVersionTwo 41 | { 42 | GHAssertEquals([versionTwo numberOfObjects], (NSUInteger)1797, nil); 43 | } 44 | - (void)testHasObjectWithSha1InVersionTwo 45 | { 46 | GHAssertTrue([versionTwo hasObjectWithSha1:@"cec49e51b154fbd982c3f023dcbde80c5687ce57"], nil); 47 | GHAssertFalse([versionTwo hasObjectWithSha1:@"cafebabe0d485f3cfd5fd9cc62491341067f0c59"], nil); 48 | } 49 | - (void)testDataForObjectWithSha1InVersionTwo 50 | { 51 | NSData * data = [versionTwo dataForObjectWithSha1:@"cec49e51b154fbd982c3f023dcbde80c5687ce57"]; 52 | GHAssertTrue(data && [data length] > 0, @"Object data is not empty"); 53 | //NSString * dataStr = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]; 54 | //GHAssertNotNil(dataStr, @"The string contents of the data block should not be nil"); 55 | } 56 | // TODO: Add more test of the data contents and sizes 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /UnitTests/Source/GITPackIndexTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITPackIndex.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 26/11/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | #import "GITPackIndex.h" 11 | 12 | @interface GITPackIndexTests : GHTestCase { 13 | GITPackIndex * versionOne; 14 | GITPackIndex * versionTwo; 15 | } 16 | 17 | @property(readwrite,retain) GITPackIndex * versionOne; 18 | @property(readwrite,retain) GITPackIndex * versionTwo; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /UnitTests/Source/GITPackStoreTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITPackStoreTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 02/12/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @class GITPackStore; 12 | @interface GITPackStoreTests : GHTestCase { 13 | GITPackStore * store; 14 | } 15 | 16 | @property(readwrite,retain) GITPackStore * store; 17 | 18 | - (void)testStoreRootIsCorrect; 19 | - (void)testLoadObjectWithSha1; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /UnitTests/Source/GITPackStoreTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITPackStoreTests.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 02/12/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITPackStoreTests.h" 10 | #import "GITPackStore.h" 11 | 12 | @implementation GITPackStoreTests 13 | @synthesize store; 14 | 15 | - (void)setUp 16 | { 17 | [super setUp]; 18 | self.store = [GITPackStore storeWithRoot:DOT_GIT]; 19 | } 20 | - (void)tearDown 21 | { 22 | self.store = nil; 23 | [super tearDown]; 24 | } 25 | 26 | - (void)testStoreRootIsCorrect 27 | { 28 | GHAssertEqualObjects(store.packsDir, DOT_GIT @"objects/pack", nil); 29 | } 30 | - (void)testLoadObjectWithSha1 31 | { 32 | NSData * raw; GITObjectType type; 33 | NSString * sha = @"226e91f3b4cca13890325f5d33ec050beca99f89"; 34 | NSString * str = @"#!/usr/bin/env ruby\n\nputs \"hello world!\"\n\nputs \"goodbye world.\"\n"; 35 | 36 | NSData * data = [str dataUsingEncoding:NSASCIIStringEncoding]; 37 | BOOL result = [store loadObjectWithSha1:sha intoData:&raw type:&type error:NULL]; 38 | 39 | GHAssertTrue(result, nil); 40 | GHAssertEquals(type, GITObjectTypeBlob, nil); 41 | GHAssertEquals([raw length], [data length], nil); 42 | GHAssertEqualObjects(raw, data, nil); 43 | } 44 | - (void)testObjectNotFoundError 45 | { 46 | NSError *error = nil; // We get a segfault if this is not preset to nil. 47 | NSData *raw; GITObjectType type; 48 | BOOL result = [store loadObjectWithSha1:@"cafebabe0d485f3cfd5fd9cc62491341067f0c59" intoData:&raw type:&type error:&error]; 49 | 50 | GHAssertFalse(result, @"Object should not be found"); 51 | GHAssertNotNil(error, @"Should not be nil"); 52 | GHAssertEquals(GITErrorObjectNotFound, [error code], @"Should have correct error code"); 53 | } 54 | @end 55 | -------------------------------------------------------------------------------- /UnitTests/Source/GITRefStoreTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITRefStoreTests.h 3 | // CocoaGit 4 | // 5 | // Created by Brian Chapados on 4/6/09. 6 | // Copyright 2009 Brian Chapados. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @class GITRefStore, GITRef; 12 | 13 | @interface GITRefStoreTests : GHTestCase { 14 | GITRefStore *store; 15 | } 16 | @property(readwrite,retain) GITRefStore *store; 17 | 18 | 19 | @end -------------------------------------------------------------------------------- /UnitTests/Source/GITRepoTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITRepoTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @class GITRepo; 12 | @interface GITRepoTests : GHTestCase { 13 | GITRepo * repo; 14 | } 15 | 16 | @property(readwrite,retain) GITRepo * repo; 17 | 18 | - (void)testIsNotNil; 19 | - (void)testRepoIsBare; 20 | - (void)testShouldLoadDataForHash; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /UnitTests/Source/GITRepoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITRepoTests.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITRepoTests.h" 10 | #import "GITRepo.h" 11 | #import "GITErrors.h" 12 | 13 | @implementation GITRepoTests 14 | @synthesize repo; 15 | 16 | - (void)setUp 17 | { 18 | [super setUp]; 19 | self.repo = [[[GITRepo alloc] initWithRoot:DOT_GIT bare:YES] autorelease]; 20 | } 21 | - (void)tearDown 22 | { 23 | self.repo = nil; 24 | [super tearDown]; 25 | } 26 | - (void)testIsNotNil 27 | { 28 | GHAssertNotNil(repo, nil); 29 | } 30 | - (void)testRepoIsBare 31 | { 32 | GHAssertTrue([repo isBare], nil); 33 | } 34 | - (void)testShouldLoadDataForHash 35 | { 36 | NSString * sha = @"87f974580d485f3cfd5fd9cc62491341067f0c59"; 37 | NSString * str = @"hello world!\n\ngoodbye world.\n"; 38 | NSData * data = [NSData dataWithData:[str dataUsingEncoding:NSASCIIStringEncoding]]; 39 | 40 | NSData * raw = [repo dataWithContentsOfObject:sha type:@"blob"]; 41 | GHAssertNotNil(raw, nil); 42 | GHAssertEqualObjects(data, raw, nil); 43 | } 44 | 45 | - (void)testBranchesInRepo 46 | { 47 | NSArray *branches = [repo branches]; 48 | GHAssertTrue([branches count] == 7, @"Repo should have 7 branches"); 49 | NSArray *names = [branches valueForKey:@"name"]; 50 | GHAssertTrue([names containsObject:@"refs/heads/ruby"], @"There should be a 'ruby' branch"); 51 | GHAssertTrue([names containsObject:@"refs/heads/master"], @"There should be a 'master' branch"); 52 | } 53 | 54 | - (void)testObjectNotFoundError 55 | { 56 | NSError *error = nil; 57 | GITObject *o = [repo objectWithSha1:@"0123456789012345678901234567890123456789" 58 | error:&error]; 59 | GHAssertNil(o, nil); 60 | GHAssertEquals(GITErrorObjectNotFound, [error code], nil); 61 | } 62 | @end 63 | -------------------------------------------------------------------------------- /UnitTests/Source/GITTestHelper.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | //#import 4 | 5 | #define COCOAGIT_REPO @"." 6 | #define TEST_RESOURCES_PATH @"../../UnitTests/Resources/" 7 | #define TEST_FIXTURES_PATH TEST_RESOURCES_PATH @"fixtures/" 8 | 9 | #define DOT_GIT TEST_RESOURCES_PATH @"dot_git/" 10 | #define DELTA_REF_PACK TEST_RESOURCES_PATH @"packs/cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack" 11 | #define DELTA_REF_PACK_IDX_V1 TEST_RESOURCES_PATH @"packs/cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.v1.idx" 12 | #define DELTA_OFS_PACK TEST_RESOURCES_PATH @"packs/cg-0.2.5-deltaofs-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack" 13 | 14 | @interface GITTestHelper : NSObject 15 | {} 16 | + (NSString *) createTempRepoWithDotGitDir:(NSString *)clonePath; 17 | + (BOOL) removeTempRepoAtPath:(NSString *)aPath; 18 | + (NSDictionary *)packedObjectInfo; 19 | @end -------------------------------------------------------------------------------- /UnitTests/Source/GITTreeEntryTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITTreeEntryTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 06/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class GITRepo, GITTree; 12 | @interface GITTreeEntryTests : GHTestCase { 13 | GITRepo * repo; 14 | GITTree * tree; 15 | NSUInteger entryMode; 16 | NSString * entryName; 17 | NSString * entrySHA1; 18 | NSString * entryLine; 19 | } 20 | 21 | @property(readwrite,retain) GITRepo * repo; 22 | @property(readwrite,retain) GITTree * tree; 23 | @property(readwrite,assign) NSUInteger entryMode; 24 | @property(readwrite,copy) NSString * entryName; 25 | @property(readwrite,copy) NSString * entrySHA1; 26 | @property(readwrite,copy) NSString * entryLine; 27 | 28 | - (void)testShouldParseEntryLine; 29 | - (void)testShouldInitWithModeNameAndHash; 30 | - (void)testShouldInitWithModeStringNameAndHash; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /UnitTests/Source/GITTreeTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITTreeTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | @class GITRepo, GITTree; 12 | @interface GITTreeTests : GHTestCase { 13 | GITRepo * repo; 14 | GITTree * tree; 15 | NSString * treeSHA1; 16 | NSUInteger rawObjectSize; 17 | } 18 | 19 | @property(readwrite,retain) GITRepo * repo; 20 | @property(readwrite,retain) GITTree * tree; 21 | @property(readwrite,copy) NSString * treeSHA1; 22 | @property(readwrite,assign) NSUInteger rawObjectSize; 23 | 24 | - (void)testShouldNotBeNil; 25 | - (void)testShouldHaveCorrectSHA; 26 | - (void)testTreeEntryLoading; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /UnitTests/Source/GITTreeTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GITTreeTests.m 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 05/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTreeTests.h" 10 | #import "GITTree.h" 11 | #import "GITRepo.h" 12 | #import "GITRepo.h" 13 | #import "NSData+Compression.h" 14 | 15 | @implementation GITTreeTests 16 | @synthesize repo; 17 | @synthesize tree; 18 | @synthesize treeSHA1; 19 | @synthesize rawObjectSize; 20 | 21 | - (void)setUp 22 | { 23 | [super setUp]; 24 | self.repo = [[[GITRepo alloc] initWithRoot:DOT_GIT bare:YES] autorelease]; 25 | self.treeSHA1 = @"a9ecfd8989d7c427c5564cf918b264261866ce01"; 26 | self.tree = [repo treeWithSha1:treeSHA1]; 27 | } 28 | - (void)tearDown 29 | { 30 | self.repo = nil; 31 | self.treeSHA1 = nil; 32 | self.tree = nil; 33 | [super tearDown]; 34 | } 35 | - (void)testShouldNotBeNil 36 | { 37 | GHAssertNotNil(tree, nil); 38 | } 39 | - (void)testShouldHaveCorrectSHA 40 | { 41 | GHAssertEqualObjects(tree.sha1, treeSHA1, nil); 42 | } 43 | - (void)testTreeEntryLoading 44 | { 45 | GHAssertNotNil(tree.entries, @"Should not be nil"); 46 | GHAssertEquals([tree.entries count], (NSUInteger)1, @"Should have 1 entry"); 47 | } 48 | 49 | - (void)testRawContent 50 | { 51 | NSData *theData; 52 | GITObjectType theType; 53 | [self.repo loadObjectWithSha1:self.treeSHA1 intoData:&theData type:&theType error:NULL]; 54 | GHAssertEqualObjects([self.tree rawContent], theData, nil); 55 | } 56 | 57 | - (void)testRawData 58 | { 59 | NSData *rawData = [self.repo dataWithContentsOfObject:self.treeSHA1]; 60 | GHAssertEqualObjects([self.tree rawData], rawData, nil); 61 | } 62 | @end 63 | -------------------------------------------------------------------------------- /UnitTests/Source/GITUtilityBeltTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // GITUtilityBeltTests.h 3 | // CocoaGit 4 | // 5 | // Created by Geoffrey Garside on 06/10/2008. 6 | // Copyright 2008 ManicPanda.com. All rights reserved. 7 | // 8 | 9 | #import "GITTestHelper.h" 10 | 11 | 12 | @interface GITUtilityBeltTests : GHTestCase { 13 | NSString * unpackedSHA1; 14 | NSData * packedSHA1Data; 15 | NSString * packedSHA1String; 16 | } 17 | 18 | @property(readwrite,copy) NSString * unpackedSHA1; 19 | @property(readwrite,copy) NSData * packedSHA1Data; 20 | @property(readwrite,copy) NSString * packedSHA1String; 21 | 22 | - (void)testPackedSHA1String; 23 | - (void)testShouldPackSHA1FromString; 24 | - (void)testShouldUnpackSHA1FromString; 25 | - (void)testShouldUnpackSHA1FromData; 26 | - (void)testShouldConvertBinaryToInteger; 27 | 28 | @end 29 | --------------------------------------------------------------------------------