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
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
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
a734acce7a
Don't use a local for this
2015-01-12 12:32:37 -08:00
Matt Diephouse
72201664a7
Add a blank line
2015-01-12 12:30:09 -08:00
Matt Diephouse
9d9023a3bd
Stub some methods
2015-01-12 00:42:20 -08:00
Matt Diephouse
2770a1083b
Sketch out tags
2015-01-11 21:48:05 -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
f496230b91
Add a rough sketch of References and Branches
2015-01-07 21:21:14 -05: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