sha1-file.c: mark more strings for translation
[gitweb.git] / object.c
index 8e29f63bf2325327027edc1ffd25e89b53309bcf..477e686da7dc783a5341888bb987a42226d75795 100644 (file)
--- a/object.c
+++ b/object.c
@@ -49,7 +49,7 @@ int type_from_string_gently(const char *str, ssize_t len, int gentle)
        if (gentle)
                return -1;
 
-       die("invalid object type \"%s\"", str);
+       die(_("invalid object type \"%s\""), str);
 }
 
 /*
@@ -169,7 +169,7 @@ void *object_as_type(struct object *obj, enum object_type type, int quiet)
        }
        else {
                if (!quiet)
-                       error("object %s is a %s, not a %s",
+                       error(_("object %s is a %s, not a %s"),
                              oid_to_hex(&obj->oid),
                              type_name(obj->type), type_name(type));
                return NULL;
@@ -213,7 +213,7 @@ struct object *parse_object_buffer(const struct object_id *oid, enum object_type
        } else if (type == OBJ_COMMIT) {
                struct commit *commit = lookup_commit(oid);
                if (commit) {
-                       if (parse_commit_buffer(commit, buffer, size))
+                       if (parse_commit_buffer(commit, buffer, size, 1))
                                return NULL;
                        if (!get_cached_commit_buffer(commit, NULL)) {
                                set_commit_buffer(commit, buffer, size);
@@ -229,7 +229,7 @@ struct object *parse_object_buffer(const struct object_id *oid, enum object_type
                        obj = &tag->object;
                }
        } else {
-               warning("object %s has unknown type id %d", oid_to_hex(oid), type);
+               warning(_("object %s has unknown type id %d"), oid_to_hex(oid), type);
                obj = NULL;
        }
        return obj;
@@ -262,7 +262,7 @@ struct object *parse_object(const struct object_id *oid)
            (!obj && has_object_file(oid) &&
             oid_object_info(the_repository, oid, NULL) == OBJ_BLOB)) {
                if (check_object_signature(repl, NULL, 0, NULL) < 0) {
-                       error("sha1 mismatch %s", oid_to_hex(oid));
+                       error(_("sha1 mismatch %s"), oid_to_hex(oid));
                        return NULL;
                }
                parse_blob_buffer(lookup_blob(oid), NULL, 0);
@@ -273,7 +273,7 @@ struct object *parse_object(const struct object_id *oid)
        if (buffer) {
                if (check_object_signature(repl, buffer, size, type_name(type)) < 0) {
                        free(buffer);
-                       error("sha1 mismatch %s", oid_to_hex(repl));
+                       error(_("sha1 mismatch %s"), oid_to_hex(repl));
                        return NULL;
                }
 
@@ -498,6 +498,9 @@ void raw_object_store_clear(struct raw_object_store *o)
        FREE_AND_NULL(o->objectdir);
        FREE_AND_NULL(o->alternate_db);
 
+       oidmap_free(o->replace_map, 1);
+       FREE_AND_NULL(o->replace_map);
+
        free_alt_odbs(o);
        o->alt_odb_tail = NULL;