remote.h: replace struct extra_have_objects with struct sha1_array

The latter can do everything the former can and is used in many more
places.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2013-12-05 20:02:29 +07:00
committed by Junio C Hamano
parent 75f8cbab2a
commit 13eb4626c4
6 changed files with 14 additions and 22 deletions

View File

@ -10,6 +10,7 @@
#include "quote.h"
#include "transport.h"
#include "version.h"
#include "sha1-array.h"
static const char send_pack_usage[] =
"git send-pack [--all | --mirror] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n"
@ -99,7 +100,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
const char *dest = NULL;
int fd[2];
struct child_process *conn;
struct extra_have_objects extra_have;
struct sha1_array extra_have = SHA1_ARRAY_INIT;
struct ref *remote_refs, *local_refs;
int ret;
int helper_status = 0;
@ -228,8 +229,6 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
args.verbose ? CONNECT_VERBOSE : 0);
}
memset(&extra_have, 0, sizeof(extra_have));
get_remote_heads(fd[0], NULL, 0, &remote_refs, REF_NORMAL, &extra_have);
transport_verify_remote_names(nr_refspecs, refspecs);