Merge branch 'it/fetch-pack-many-refs' into maint
[gitweb.git] / bundle.c
index 7a760db2fc4ab2a807bead051edbf53182c8326a..27ab32e431660a217d5dce50fe5b5b91888b5908 100644 (file)
--- a/bundle.c
+++ b/bundle.c
@@ -273,7 +273,7 @@ int create_bundle(struct bundle_header *header, const char *path,
                        if (!get_sha1_hex(buf.buf + 1, sha1)) {
                                struct object *object = parse_object(sha1);
                                object->flags |= UNINTERESTING;
-                               add_pending_object(&revs, object, buf.buf);
+                               add_pending_object(&revs, object, xstrdup(buf.buf));
                        }
                } else if (!get_sha1_hex(buf.buf, sha1)) {
                        struct object *object = parse_object(sha1);
@@ -289,7 +289,7 @@ int create_bundle(struct bundle_header *header, const char *path,
        argc = setup_revisions(argc, argv, &revs, NULL);
 
        if (argc > 1)
-               return error("unrecognized argument: %s'", argv[1]);
+               return error("unrecognized argument: %s", argv[1]);
 
        object_array_remove_duplicates(&revs.pending);