path: root/transport.h
diff options
authorShawn O. Pearce <>2007-09-14 07:31:21 (GMT)
committerJunio C Hamano <>2007-09-19 10:22:30 (GMT)
commit425b1393139d99d89c7a95906686d9b041f2ee3d (patch)
tree929a07ce573bd363eb88bddbef476742b6de7ef6 /transport.h
parent7a2bff45937a60d846abf3ccb42015539aedcb40 (diff)
Simplify fetch transport API to just one function
Commit walkers need to know the SHA-1 name of any objects they have been asked to fetch while the native pack transport only wants to know the names of the remote refs as the remote side must do the name->SHA-1 translation. Since we only have three fetch implementations and one of them (bundle) doesn't even need the name information we can reduce the code required to perform a fetch by having just one function and passing of the filtered list of refs to be fetched. Each transport can then obtain the information it needs from that ref array to construct its own internal operation state. Signed-off-by: Shawn O. Pearce <> Conflicts: transport.c Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'transport.h')
1 files changed, 1 insertions, 4 deletions
diff --git a/transport.h b/transport.h
index 5b0a6b0..b354a8f 100644
--- a/transport.h
+++ b/transport.h
@@ -30,10 +30,7 @@ struct transport_ops {
const char *value);
struct ref *(*get_refs_list)(const struct transport *transport);
- int (*fetch_refs)(const struct transport *transport,
- int nr_refs, char **refs);
- int (*fetch_objs)(const struct transport *transport,
- int nr_objs, char **objs);
+ int (*fetch)(const struct transport *transport, int refs_nr, struct ref **refs);
int (*push)(struct transport *connection, int refspec_nr, const char **refspec, int flags);
int (*disconnect)(struct transport *connection);