Move push matching and reporting logic into transport.c

For native-protocol pushes (and other protocols as they are converted
to the new method), this moves the refspec match, tracking update, and
report message out of send-pack() and into transport_push(), where it
can be shared completely with other protocols. This also makes fetch
and push more similar in terms of what code is in what file.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Daniel Barkalow
2009-03-08 21:06:07 -04:00
committed by Junio C Hamano
parent a9c37a72c4
commit 64fcef2daa
4 changed files with 343 additions and 92 deletions

View File

@ -2,9 +2,7 @@
#define SEND_PACK_H
struct send_pack_args {
const char *receivepack;
unsigned verbose:1,
send_all:1,
send_mirror:1,
force_update:1,
use_thin_pack:1,
@ -12,7 +10,7 @@ struct send_pack_args {
};
int send_pack(struct send_pack_args *args,
const char *dest, struct remote *remote,
int nr_heads, const char **heads);
int fd[], struct child_process *conn,
struct ref *remote_refs, struct extra_have_objects *extra_have);
#endif