Commit Graph

28 Commits

Author SHA1 Message Date
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
910b9b35d2 Implement remoteBranches() 2015-02-14 12:50:01 -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
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
a8cc3144c4 Implement localBranchWithName() 2015-02-13 15:36:58 -05:00
Matt Diephouse
dc48554f71 Implement referenceWithName() 2015-01-30 15:55:09 -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
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
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
7ef1b5337c Add a Tree struct 2014-12-06 23:17:08 -05:00
Matt Diephouse
cfe199bc94 Add parens to describe description 2014-12-05 23:36:26 -05:00
Matt Diephouse
b4dac5a6be Look up commits in the repository 2014-12-05 15:27:35 -05:00
Matt Diephouse
b5673e8620 Actually load a repository 2014-11-17 00:31:33 -05:00
Matt Diephouse
26efaf67c3 Use Quick and Nimble 2014-11-07 17:11:47 -05:00