1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-17 14:34:49 +01:00
git/send-pack.h
Andy Whitcroft 28b9d6e548 Teach send-pack a mirror mode
Existing "git push --all" is almost perfect for backing up to
another repository, except that "--all" only means "all
branches" in modern git, and it does not delete old branches and
tags that exist at the back-up repository that you have removed
from your local repository.

This teaches "git-send-pack" a new "--mirror" option.  The
difference from the "--all" option are that (1) it sends all
refs, not just branches, and (2) it deletes old refs you no
longer have on the local side from the remote side.

Original patch by Junio C Hamano.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-09 21:14:10 -08:00

18 lines
338 B
C

#ifndef SEND_PACK_H
#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,
dry_run:1;
};
int send_pack(struct send_pack_args *args,
const char *dest, struct remote *remote,
int nr_heads, const char **heads);
#endif