Fix off by one bug in reflog messages written by builtin-fetch
[gitweb.git] / builtin-fetch.c
index 64392f317d416e54554f634ece64c380c485c776..016c6e43ece348ac0763a21c1cb6ae971e164f94 100644 (file)
@@ -217,7 +217,7 @@ static void store_updated_refs(const char *url, struct ref *ref_map)
                        strcpy(ref->name, rm->peer_ref->name);
                        hashcpy(ref->old_sha1, rm->peer_ref->old_sha1);
                        hashcpy(ref->new_sha1, rm->old_sha1);
-                       ref->force = rm->force;
+                       ref->force = rm->peer_ref->force;
                }
 
                commit = lookup_commit_reference(rm->old_sha1);
@@ -503,7 +503,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
        rla_offset = strlen(default_rla);
        for (j = 1; j < argc; j++) {
                sprintf(default_rla + rla_offset, " %s", argv[j]);
-               rla_offset += strlen(argv[j]);
+               rla_offset += strlen(argv[j]) + 1;
        }
 
        if (i == argc)