From 28b9d6e548322755bbdb24c28a493862f61b1eba Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Fri, 9 Nov 2007 23:32:10 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- remote.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'remote.h') diff --git a/remote.h b/remote.h index 6a4c7a0f37..b10036cae6 100644 --- a/remote.h +++ b/remote.h @@ -102,4 +102,11 @@ struct branch *branch_get(const char *name); int branch_has_merge_config(struct branch *branch); int branch_merge_matches(struct branch *, int n, const char *); +/* Flags to match_refs. */ +enum match_refs_flags { + MATCH_REFS_NONE = 0, + MATCH_REFS_ALL = (1 << 0), + MATCH_REFS_MIRROR = (1 << 1), +}; + #endif -- cgit v1.2.3