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
Matt Diephouse
7ee768f37f
Merge pull request #17 from SwiftGit2/swift-1.2
...
Support Swift 1.2
2015-03-07 21:22:16 -05:00
Brian Gesiak
2ca3ad1a80
Merge remote-tracking branch 'origin' into swift-1.2
...
Conflicts:
SwiftGit2Tests/RepositorySpec.swift
2015-03-07 12:47:27 -05: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
90ecfc3166
Sort Errors.swift alphabetically in project
2015-03-07 12:43:38 -05:00
Matt Diephouse
a1cdaf4422
Only copy the libgit2 headers that we need
2015-03-07 12:43:38 -05:00
Matt Diephouse
edf555f5b8
Fix memory leak
2015-03-07 12:43:37 -05:00
Matt Diephouse
2d0c0765fc
Add Repository.HEAD()
2015-03-07 12:43:37 -05:00
Brian Gesiak
21b5235bcc
Merge pull request #19 from SwiftGit2/only-copy-what-we-need
...
Only copy the libgit2 headers that we need
2015-03-03 23:58:05 -05:00
Matt Diephouse
f6c55dbea6
Sort Errors.swift alphabetically in project
2015-03-03 22:11:19 -05:00
Matt Diephouse
ebf83a9513
Only copy the libgit2 headers that we need
2015-03-03 22:10:53 -05:00
Brian Gesiak
8b77cebafc
Merge pull request #18 from SwiftGit2/working-directory
...
Add Repository.HEAD()
2015-02-21 23:32:56 -05:00
Matt Diephouse
0a6788a22a
Fix memory leak
2015-02-21 23:18:12 -05:00
Matt Diephouse
06ac4d42f5
Add Repository.HEAD()
2015-02-21 21:40:12 -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
Matt Diephouse
5af50ab922
Merge pull request #15 from modocache/10-error-handling
...
Capture libgit2 error messages
2015-02-21 18:20:30 -05:00
Brian Gesiak
1809a85215
Errors: Adjust indentation to tabs
2015-02-21 17:00:11 -05:00
Matt Diephouse
c5968b7e4e
++libgit2
2015-02-21 15:18:28 -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
7d6409a406
.gitmodules: Add Nimble
...
Instead of relying on the version of Nimble that Quick uses for its test
target, use a top-level submodule to version Nimble.
2015-02-20 01:47:49 -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
908f774cc8
.gitmodules: Add Guanaco
...
Guanaco provides Nimble assertions for LlamaKit.Result, such as:
```
expect(result).to(haveFailed(domain: "com.libgit2"))
```
These custom assertions will be useful when testing that libgit2 error
messages are properly captured and reported.
2015-02-18 00:14:14 -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
860b30c506
Merge pull request #9 from mdiep/references
...
References
2015-02-14 15:21:41 -08: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
68283cf8ef
Implement localBranchWithName() with referenceWithName()
2015-02-14 12:18:09 -05:00
Matt Diephouse
ca9cf88888
Get rid of allBranches() for now
2015-02-14 12:14:37 -05:00
Matt Diephouse
4acd80918f
Implement allTags()
2015-02-14 12:13:18 -05:00
Matt Diephouse
0b8120ee7d
Add and use referencesWithPrefix()
2015-02-14 12:10:44 -05:00
Matt Diephouse
4b0823918d
Implement localBranches()
2015-02-14 12:04:08 -05:00
Matt Diephouse
d38b1a9b7a
Define map on git_strarray
2015-02-14 11:56:05 -05:00
Matt Diephouse
707457efba
Swift strings can be passed to C functions! 🎉
2015-02-14 11:39:38 -05:00
Matt Diephouse
f0f8e30d03
Fix leak
2015-02-14 11:37:28 -05:00
Matt Diephouse
b1d2927808
Document these methods
2015-02-14 11:35:39 -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
4368756bbb
Define equality generically for all ReferenceTypes
2015-02-14 11:17:17 -05:00
Matt Diephouse
a0f76f6c26
Make TagReference Hashable
2015-02-14 11:16:08 -05:00
Matt Diephouse
fc641cbb94
Clean up Repository's init()
2015-02-14 11:13:12 -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