path: root/http-push.c
diff options
authorAndy Whitcroft <>2007-11-09 23:32:10 (GMT)
committerJunio C Hamano <>2007-11-10 05:14:10 (GMT)
commit28b9d6e548322755bbdb24c28a493862f61b1eba (patch)
tree8dd1105f04082020776aaf9cf399ce2fffa64d7f /http-push.c
parent0d9d89f61c58f72d96585a61defb0634873c38ac (diff)
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 <>
Diffstat (limited to 'http-push.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/http-push.c b/http-push.c
index 99328f5..66b81f1 100644
--- a/http-push.c
+++ b/http-push.c
@@ -78,7 +78,7 @@ static struct curl_slist *no_pragma_header;
static struct curl_slist *default_headers;
static int push_verbosely;
-static int push_all;
+static int push_all = MATCH_REFS_NONE;
static int force_all;
static int dry_run;
@@ -2300,7 +2300,7 @@ int main(int argc, char **argv)
if (*arg == '-') {
if (!strcmp(arg, "--all")) {
- push_all = 1;
+ push_all = MATCH_REFS_ALL;
if (!strcmp(arg, "--force")) {