1788c39cd0
If we are using a native packfile to perform a git-fetch invocation and the received packfile contained more than the configured limits of fetch.unpackLimit/transfer.unpackLimit then index-pack will output a single line saying "keep\t$sha1\n" to stdout. This line needs to be captured and retained so we can delete the corresponding .keep file ("$GIT_DIR/objects/pack/pack-$sha1.keep") once all refs have been safely updated. This trick has long been in use with git-fetch.sh and its lower level helper git-fetch--tool as a way to allow index-pack to save the new packfile before the refs have been updated and yet avoid a race with any concurrently running git-repack process. It was unfortunately lost when git-fetch.sh was converted to pure C and fetch--tool was no longer being invoked. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
22 lines
377 B
C
22 lines
377 B
C
#ifndef FETCH_PACK_H
|
|
#define FETCH_PACK_H
|
|
|
|
struct fetch_pack_args
|
|
{
|
|
const char *uploadpack;
|
|
int quiet;
|
|
int keep_pack;
|
|
int unpacklimit;
|
|
int use_thin_pack;
|
|
int fetch_all;
|
|
int verbose;
|
|
int depth;
|
|
int no_progress;
|
|
};
|
|
|
|
void setup_fetch_pack(struct fetch_pack_args *args);
|
|
|
|
struct ref *fetch_pack(const char *dest, int nr_heads, char **heads, char **pack_lockfile);
|
|
|
|
#endif
|