SwiftGit2/SwiftGit2Tests
Tom Booth 60cb395cc6 Add cloneFromURL function
This introduces a new static function on Repository that will allow a
user to clone a local or remote repository.

At the moment only SSH in-memory, username + password and default (no
creds) are implemented.

It provides an enum wrapper around the underlying libgit2 `git_cred_t`
type to abstract it away from the user into something that is a little
more Swift-like. As much of the C callback code and struct creation has
been moved into Swift-land as well, this is now possible as of 2.*
whereas before it was not.

I had to use a wrapper class in Credentials.swift in order to convert
blocks to pointers, as blocks do not implement the AnyObject protocol
that `Unmanaged` requies.

The test requires you passing through a set of environment variables
otherwise it will not run. This is so that secret/private information
isn't leaked into the repository. The required variables are as follows:

   - SG2TestPrivateRepo - the url of the private jrepo to clone;
   - SG2TestUsername - the url of the user that will be connecting;
   - SG2TestPublicKey - the public key data to be used;
   - SG2TestPrivateKey - the private key data;
   - SG2TestPassphrase - passphrase needed to use the private key (blank
     if none).
2016-04-07 14:50:38 +01:00
..
Fixtures Vary the bundle identifier based on platform 2016-02-16 16:51:49 +00:00
FixturesSpec.swift Actually load a repository 2014-11-17 00:31:33 -05:00
Info.plist updated to Swift 2.0 2016-01-16 14:57:32 +00:00
ObjectsSpec.swift updated to Swift 2.0 2016-01-16 14:57:32 +00:00
OIDSpec.swift Switch from LlamaKit to antitypical/Result 2015-04-15 21:32:10 -04:00
ReferencesSpec.swift updated to Swift 2.0 2016-01-16 14:57:32 +00:00
RemotesSpec.swift updated to Swift 2.0 2016-01-16 14:57:32 +00:00
RepositorySpec.swift Add cloneFromURL function 2016-04-07 14:50:38 +01:00