git-svn: allow SVN:: lib users to track the root of the repository (again)
[gitweb.git] / send-pack.c
index 54d218c03b68d0b5bf1c2304b7b5bee2d0bd98a6..447666665bc43090849a66681edec663fe75000c 100644 (file)
@@ -6,14 +6,13 @@
 #include "exec_cmd.h"
 
 static const char send_pack_usage[] =
-"git-send-pack [--all] [--keep] [--exec=git-receive-pack] <remote> [<head>...]\n"
+"git-send-pack [--all] [--exec=git-receive-pack] <remote> [<head>...]\n"
 "  --all and explicit <head> specification are mutually exclusive.";
 static const char *exec = "git-receive-pack";
 static int verbose;
 static int send_all;
 static int force_update;
 static int use_thin_pack;
-static int keep_pack;
 
 static int is_zero_sha1(const unsigned char *sha1)
 {
@@ -30,6 +29,7 @@ static void exec_pack_objects(void)
 {
        static const char *args[] = {
                "pack-objects",
+               "--all-progress",
                "--stdout",
                NULL
        };
@@ -216,7 +216,7 @@ static int ref_newer(const unsigned char *new_sha1,
 static struct ref *local_refs, **local_tail;
 static struct ref *remote_refs, **remote_tail;
 
-static int one_local_ref(const char *refname, const unsigned char *sha1)
+static int one_local_ref(const char *refname, const unsigned char *sha1, int flag, void *cb_data)
 {
        struct ref *ref;
        int len = strlen(refname) + 1;
@@ -231,7 +231,7 @@ static int one_local_ref(const char *refname, const unsigned char *sha1)
 static void get_local_heads(void)
 {
        local_tail = &local_refs;
-       for_each_ref(one_local_ref);
+       for_each_ref(one_local_ref, NULL);
 }
 
 static int receive_status(int in)
@@ -271,7 +271,6 @@ static int send_pack(int in, int out, int nr_refspec, char **refspec)
        int new_refs;
        int ret = 0;
        int ask_for_status_report = 0;
-       int ask_to_keep_pack = 0;
        int expect_status_report = 0;
 
        /* No funny business with the matcher */
@@ -281,8 +280,6 @@ static int send_pack(int in, int out, int nr_refspec, char **refspec)
        /* Does the other end support the reporting? */
        if (server_supports("report-status"))
                ask_for_status_report = 1;
-       if (server_supports("keep-pack") && keep_pack)
-               ask_to_keep_pack = 1;
 
        /* match them up */
        if (!remote_tail)
@@ -359,17 +356,12 @@ static int send_pack(int in, int out, int nr_refspec, char **refspec)
                strcpy(old_hex, sha1_to_hex(ref->old_sha1));
                new_hex = sha1_to_hex(ref->new_sha1);
 
-               if (ask_for_status_report || ask_to_keep_pack) {
-                       packet_write(out, "%s %s %s%c%s%s",
+               if (ask_for_status_report) {
+                       packet_write(out, "%s %s %s%c%s",
                                     old_hex, new_hex, ref->name, 0,
-                                    ask_for_status_report
-                                    ? " report-status" : "",
-                                    ask_to_keep_pack
-                                    ? " keep-pack" : "");
-                       if (ask_for_status_report)
-                               expect_status_report = 1;
+                                    "report-status");
                        ask_for_status_report = 0;
-                       ask_to_keep_pack = 0;
+                       expect_status_report = 1;
                }
                else
                        packet_write(out, "%s %s %s",
@@ -428,10 +420,6 @@ int main(int argc, char **argv)
                                verbose = 1;
                                continue;
                        }
-                       if (!strcmp(arg, "--keep")) {
-                               keep_pack = 1;
-                               continue;
-                       }
                        if (!strcmp(arg, "--thin")) {
                                use_thin_pack = 1;
                                continue;