1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-09 02:33:11 +01:00
git/fetch-pack.h
Junio C Hamano 47a5918536 cache.h: move remote/connect API out of it
The definition of "struct ref" in "cache.h", a header file so
central to the system, always confused me.  This structure is not
about the local ref used by sha1-name API to name local objects.

It is what refspecs are expanded into, after finding out what refs
the other side has, to define what refs are updated after object
transfer succeeds to what values.  It belongs to "remote.h" together
with "struct refspec".

While we are at it, also move the types and functions related to the
Git transport connection to a new header file connect.h

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-08 14:34:24 -07:00

38 lines
833 B
C

#ifndef FETCH_PACK_H
#define FETCH_PACK_H
#include "string-list.h"
#include "run-command.h"
struct fetch_pack_args {
const char *uploadpack;
int unpacklimit;
int depth;
unsigned quiet:1,
keep_pack:1,
lock_pack:1,
use_thin_pack:1,
fetch_all:1,
stdin_refs:1,
verbose:1,
no_progress:1,
include_tag:1,
stateless_rpc:1,
check_self_contained_and_connected:1,
self_contained_and_connected:1;
};
/*
* sought represents remote references that should be updated from.
* On return, the names that were found on the remote will have been
* marked as such.
*/
struct ref *fetch_pack(struct fetch_pack_args *args,
int fd[], struct child_process *conn,
const struct ref *ref,
const char *dest,
struct ref **sought,
int nr_sought,
char **pack_lockfile);
#endif