Carlos Martín Nieto
231f350d91
remote: don't free the remote on delete
...
This was a bad idea. Don't free except in the free function.
2014-06-06 22:55:34 +02:00
Carlos Martín Nieto
eb6aa791a7
remote: failing test for renaming with a symref
2014-06-06 22:36:41 +02:00
Carlos Martín Nieto
72bca13e5d
remote: return problem refspecs instead of using a callback
...
There is no reason why we need to use a callback here. A string array
fits better with the usage, as this is not an event and we don't need
anything from the user.
2014-06-06 21:43:04 +02:00
Carlos Martín Nieto
fe3b9d0731
remote: failing test for rename
...
When there is a reference in the target namespace, we should overwrite
it. Instead it gets a different name under the current code.
2014-06-06 00:54:11 +02:00
Arthur Schreiber
d723dbed0c
Remote: Set an error when a remote cannot be found.
...
Inside `git_remote_load`, the calls to `get_optional_config` use
`giterr_clear` to unset any errors that are set due to missing config
keys. If neither a fetch nor a push url config was found for a remote,
we should set an error again.
2014-05-30 19:26:49 +02:00
Carlos Martín Nieto
d22db24fb7
remote: add api to guess the remote's default branch
...
If the remote supports the symref protocol extension, then we return
that, otherwise we guess with git's rules.
2014-05-21 12:12:32 +02:00
Vicent Marti
124a45ead3
Merge pull request #2354 from libgit2/cmn/clone-into-mirror
...
Allow mirror-clone via `git_clone_into()`
2014-05-19 15:00:50 +02:00
Carlos Martín Nieto
b206724863
clone: add failing test for a mirror-clone with clone_into
...
Show a failure to perform a mirror-clone from a repository, both local
and remote.
2014-05-19 14:24:43 +02:00
Vicent Marti
228272ef58
Merge pull request #2313 from libgit2/cmn/remote-delete
...
Remote deletion
2014-05-16 11:56:37 +02:00
Carlos Martín Nieto
ec8a949a58
remote: remove remote-tracking branches on delete
...
When we delete a remote, we also need to go through its fetch refspecs
and remove the references they create locally.
2014-05-16 10:02:07 +02:00
nulltoken
40e48ea40f
remote: Introduce git_remote_delete()
2014-04-30 11:45:49 +02:00
Carlos Martín Nieto
1f0d4f3d8d
netops: unit-test the cert host-name pattern matching
...
This kind of stuff should have unit tests, even if it's just to show
what we expect to match successfully.
2014-04-26 17:27:42 +02:00
Carlos Martín Nieto
fd536d29c1
remote: rename inmemory to anonymous and swap url and fetch order
...
The order in this function is the opposite to what
create_with_fetchspec() has, so change this one, as url-then-refspec is
what git does.
As we need to break compilation and the swap doesn't do that, let's take
this opportunity to rename in-memory remotes to anonymous as that's
really what sets them apart.
2014-04-01 13:38:04 +02:00
Ben Straub
db55bb73ff
Correct default reflog message for git_remote_fetch
2014-02-06 11:18:10 -08:00
Ben Straub
c3ab1e5af4
Add reflog parameters to remote apis
...
Also added a test for git_remote_fetch.
2014-02-04 20:38:13 -08:00
Edward Thomson
96f12e709b
Don't strcmp a git_buf, strcmp its char *
2014-01-29 12:50:42 -08:00
Vicent Marti
46e7fc1853
Merge pull request #2077 from libgit2/cmn/buf-out
...
Buff up returning strings
2014-01-27 09:36:24 -08:00
Carlos Martín Nieto
66d585c6b3
MSVC doesn't like modern code
2014-01-27 04:58:23 +01:00
Carlos Martín Nieto
bf522e0811
refspec: move to git_buf for outputting strings
2014-01-27 04:44:06 +01:00
Arthur Schreiber
991b2840eb
Make sure git_remote_dup copies a remote's refspecs correctly.
2014-01-26 19:35:02 +01:00
Graham Dennis
c7015424cc
Fix a compile warning.
2014-01-18 08:54:19 +11:00
Graham Dennis
194d077c4f
Add test for pushing to a local file:// URL.
2014-01-18 08:43:29 +11:00
Arthur Schreiber
40ef47dd46
Add git_remote_dup
.
2014-01-14 21:03:01 +01:00
Ben Straub
1782038144
Rename tests-clar to tests
2013-11-14 14:05:52 -08:00