diff options
| author | Michael Schubert <schu@schu.io> | 2012-05-18 12:36:25 +0200 |
|---|---|---|
| committer | Michael Schubert <schu@schu.io> | 2012-05-18 12:44:01 +0200 |
| commit | a167002f9e8e0fc1ebf3922a3da3628c54e4b319 (patch) | |
| tree | 563dfafbf8f3f394a370773d8eb78abe0b037b3f | |
| parent | 6ec01e6361f7d71d8f080d9d28c966a73ecdb3b3 (diff) | |
| download | libgit2-a167002f9e8e0fc1ebf3922a3da3628c54e4b319.tar.gz | |
fetch: set dummy function for local fetch
Local fetch isn't implemented yet. Don't segfault on call, but set a
dummy for negotiate_fetch and terminate gracefully.
Reported-by: Brad Harder <bch@methodlogic.net>
| -rw-r--r-- | src/transports/local.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/transports/local.c b/src/transports/local.c index 5dc350103..aa5155ef6 100644 --- a/src/transports/local.c +++ b/src/transports/local.c @@ -176,6 +176,16 @@ static int local_connect(git_transport *transport, int direction) return 0; } +static int local_negotiate_fetch(git_transport *transport, git_repository *repo, const git_vector *wants) +{ + GIT_UNUSED(transport); + GIT_UNUSED(repo); + GIT_UNUSED(wants); + + giterr_set(GITERR_NET, "Fetch via local transport isn't implemented. Sorry"); + return -1; +} + static int local_close(git_transport *transport) { transport_local *t = (transport_local *)transport; @@ -220,6 +230,7 @@ int git_transport_local(git_transport **out) t->parent.connect = local_connect; t->parent.ls = local_ls; + t->parent.negotiate_fetch = local_negotiate_fetch; t->parent.close = local_close; t->parent.free = local_free; |
