Commit Graph

63 Commits

Author SHA1 Message Date
Matt Diephouse
b6822f40e6 Be more Swifty in test descriptions 2015-03-09 17:42:44 -04:00
Matt Diephouse
66ba594070 Use COpaquePointer directly 2015-03-09 17:32:48 -04:00
Brian Gesiak
186b5aadc9 .gitmodules: Xcode 6.3b2 updates
- Update submodules to eliminate new warnings, errors in Xcode 6.3b2.
- COpaquePointer.null() no longer available; instantiate with nil literal
  instead.
- Fix warning when chaining optionals and optional casts.
2015-03-07 12:43:38 -05:00
Matt Diephouse
2d0c0765fc Add Repository.HEAD() 2015-03-07 12:43:37 -05:00
Brian Gesiak
ba9a951b62 Support Swift 1.2
- Update Guanaco, LlamaKit, Nimble, and Quick to versions that support
  Swift 1.2.
- Update Xcode project and scheme files for "latest Xcode version"
  parameters.
- Use Swift 1.2's new fallible casts for casts that may fail at runtime.
2015-02-21 21:28:43 -05:00
Brian Gesiak
f23f98f033 Repository: Return libgit2 errors for failures
- Update Guanaco for improved matching on failures,
  i.e.: `haveFailed(beAnError(domain: match("abc")))`.
- All functions that return Result objects now return sane errors for
  failure cases.
- Unit tests verify libgit2 error is domain is used for most failures.
2015-02-20 01:52:39 -05:00
Brian Gesiak
dd7d49a545 Errors: Use public constant for libgit2 domain 2015-02-19 13:38:05 -05:00
Brian Gesiak
17022d69d8 Repository: Propagate libgit2 errors
Instead of returning the default LlamaKit error, return the underlying
libgit2 error when Repository.atURL fails.
2015-02-19 13:37:38 -05:00
Brian Gesiak
1019a94d53 .gitmodules: Update LlamaKit to v0.5.0
This is the first of a series of commits intended to resolve issue #10,
which calls for proper error handling.

One way to test that libgit2 error messages are being propagated through
Result failures is by asserting that the error's description or code
match the message or code we expect. In order to do so, LlamaKit's
ErrorType is unweildy, and not future-proof--it would be easier and
safer to write assertions based on NSError.

Upgrade LlamaKit to v0.5.0, the latest version that supports Swift 1.1,
in order to define results as type `Result<T, NSError>`.
2015-02-17 22:18:51 -05:00
Matt Diephouse
67d44d96d1 Add isLocal and isRemote to Branch 2015-02-14 12:52:56 -05:00
Matt Diephouse
910b9b35d2 Implement remoteBranches() 2015-02-14 12:50:01 -05:00
Matt Diephouse
40ad018ffd Handle symbolic branches 2015-02-14 12:49:47 -05:00
Matt Diephouse
935121e0db Implement remoteBranchWithName() 2015-02-14 12:24:22 -05:00
Matt Diephouse
4acd80918f Implement allTags() 2015-02-14 12:13:18 -05:00
Matt Diephouse
4b0823918d Implement localBranches() 2015-02-14 12:04:08 -05:00
Matt Diephouse
707457efba Swift strings can be passed to C functions! 🎉 2015-02-14 11:39:38 -05:00
Matt Diephouse
411b23cbbe Implement tagWithName() 2015-02-14 11:33:03 -05:00
Matt Diephouse
4a0bcede38 Make referenceWithName return a ReferenceType 2015-02-14 11:30:04 -05:00
Matt Diephouse
a0f76f6c26 Make TagReference Hashable 2015-02-14 11:16:08 -05:00
Matt Diephouse
45dfcb4cce Add an initializer for TagReference 2015-02-14 11:12:32 -05:00
Matt Diephouse
a8cc3144c4 Implement localBranchWithName() 2015-02-13 15:36:58 -05:00
Matt Diephouse
f46d869de7 Make Branch Hashable 2015-02-13 14:44:02 -05:00
Matt Diephouse
d84cf377d0 Add an initializer for Branch 2015-02-13 14:39:25 -05:00
Matt Diephouse
28f3706a1d Fetch upstream branches for Mantle 2015-02-13 14:38:45 -05:00
Matt Diephouse
dc48554f71 Implement referenceWithName() 2015-01-30 15:55:09 -05:00
Matt Diephouse
2a4c231230 Make Reference Hashable 2015-01-30 15:09:04 -05:00
Matt Diephouse
d1928ca06c Add an initializer to Reference 2015-01-16 16:38:10 -05:00
Matt Diephouse
6e4f7358de Fix up indentation 2015-01-12 12:35:11 -08:00
Matt Diephouse
8b92b6f9ca Implement objectWithOID 2015-01-11 14:19:04 -08:00
Matt Diephouse
ec0ea6e0bd This test isn't crashing swift anymore :-/ 2015-01-11 10:27:30 -08:00
Matt Diephouse
4a0b5cd838 Add Remotes 2015-01-03 09:43:42 -05:00
Matt Diephouse
e40e19a3fc Create files for remotes 2015-01-02 14:28:53 -05:00
Matt Diephouse
ecea586f73 Create files for references 2015-01-02 10:34:06 -05:00
Matt Diephouse
52d1a2e9f7 Look up objects from Pointers 2014-12-23 17:30:16 -10:00
Matt Diephouse
146813826f Look up objects from PointerTos 2014-12-23 15:06:59 -10:00
Matt Diephouse
a3322e52f7 Add PointerTo 2014-12-23 13:31:13 -10:00
Matt Diephouse
1df50f196c Rename Object to Pointer 2014-12-23 06:23:43 -10:00
Matt Diephouse
6c5f88fed1 Tabs, not spaces 2014-12-19 16:47:24 -10:00
Matt Diephouse
5cb4930451 Swap the Object and ObjectType names 2014-12-15 21:03:09 -05:00
Matt Diephouse
1059716ceb Make ObjectType take an OID 2014-12-15 20:57:27 -05:00
Matt Diephouse
2a9f0aefa0 Use Int32 for tree entry attributes 2014-12-11 20:45:11 -05:00
Matt Diephouse
51b34f9ad0 Use unnamed args for libgit2 objects in inits 2014-12-11 20:42:15 -05:00
Matt Diephouse
931b6e6768 Add a Tag struct 2014-12-10 15:21:06 -05:00
Matt Diephouse
d0be6179b9 Add a Blob struct 2014-12-08 23:28:34 -05:00
Matt Diephouse
9b3cad3b73 Fill out Tree 2014-12-07 15:09:12 -05:00
Matt Diephouse
7ef1b5337c Add a Tree struct 2014-12-06 23:17:08 -05:00
Matt Diephouse
9bfcad4004 Make Commit Equatable and Hashable 2014-12-06 21:51:46 -05:00
Matt Diephouse
0dd40c2d2f Add tree and parents to Commit 2014-12-06 21:09:06 -05:00
Matt Diephouse
253f7a2bf6 Add author and committer to Commit 2014-12-06 19:46:24 -05:00
Matt Diephouse
d3eb02bd03 Make Signature Equatable and Hashable 2014-12-06 09:38:33 -05:00