diff options
| author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-08-12 19:02:36 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-08-18 02:34:10 +0200 |
| commit | 946dab73ba68b0d658cfb1544c1d35d1222b2087 (patch) | |
| tree | 18367ac46ffcb534aaafe7f779348d3c7034905b /src | |
| parent | 22f65b9e730cd14275897a07b61e338e25099b19 (diff) | |
| download | libgit2-946dab73ba68b0d658cfb1544c1d35d1222b2087.tar.gz | |
Implement and bind local_send_wants
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src')
| -rw-r--r-- | src/transport_local.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/transport_local.c b/src/transport_local.c index b38679a3b..6cb261b4c 100644 --- a/src/transport_local.c +++ b/src/transport_local.c @@ -12,6 +12,7 @@ typedef struct { git_transport parent; git_repository *repo; git_vector *refs; + git_headarray wants_list; } transport_local; /* @@ -165,10 +166,17 @@ static int local_ls(git_transport *transport, git_headarray *array) return error; } -static int local_send_wants(git_transport *GIT_UNUSED(transport), git_headarray *GIT_UNUSED(array)) +static int local_send_wants(git_transport *transport, git_headarray *array) { - GIT_UNUSED_ARG(tranport); - GIT_UNUSED_ARG(array); + transport_local *t = (transport_local *) transport; + git_headarray *wants = &t->wants_list; + + /* + * We need to store the list of wanted references so we can figure + * out what to transmit later. + */ + wants->len = array->len; + wants->heads = array->heads; /* We're local anyway, so we don't need this */ return GIT_SUCCESS; @@ -215,6 +223,7 @@ int git_transport_local(git_transport **out) t->parent.connect = local_connect; t->parent.ls = local_ls; + t->parent.send_wants = local_send_wants; t->parent.close = local_close; t->parent.free = local_free; |
