apply --recount: allow "no-op hunks"
[gitweb.git] / replace-object.c
index 246b98cd4f1e4d229109bbeb8ffe90731df43df0..4ec77ce41848311a912256046bd2bf8dc9ee63c0 100644 (file)
@@ -17,7 +17,7 @@ static int register_replace_ref(const char *refname,
 
        if (get_oid_hex(hash, &repl_obj->original.oid)) {
                free(repl_obj);
-               warning("bad replace ref name: %s", refname);
+               warning(_("bad replace ref name: %s"), refname);
                return 0;
        }
 
@@ -26,7 +26,7 @@ static int register_replace_ref(const char *refname,
 
        /* Register new object */
        if (oidmap_put(the_repository->objects->replace_map, repl_obj))
-               die("duplicate replace ref: %s", refname);
+               die(_("duplicate replace ref: %s"), refname);
 
        return 0;
 }
@@ -37,7 +37,7 @@ static void prepare_replace_object(struct repository *r)
                return;
 
        r->objects->replace_map =
-               xmalloc(sizeof(*the_repository->objects->replace_map));
+               xmalloc(sizeof(*r->objects->replace_map));
        oidmap_init(r->objects->replace_map, 0);
 
        for_each_replace_ref(r, register_replace_ref, NULL);
@@ -51,7 +51,7 @@ static void prepare_replace_object(struct repository *r)
  * replacement object's name (replaced recursively, if necessary).
  * The return value is either oid or a pointer to a
  * permanently-allocated value.  This function always respects replace
- * references, regardless of the value of check_replace_refs.
+ * references, regardless of the value of read_replace_refs.
  */
 const struct object_id *do_lookup_replace_object(struct repository *r,
                                                 const struct object_id *oid)
@@ -69,5 +69,5 @@ const struct object_id *do_lookup_replace_object(struct repository *r,
                        return cur;
                cur = &repl_obj->replacement;
        }
-       die("replace depth too high for object %s", oid_to_hex(oid));
+       die(_("replace depth too high for object %s"), oid_to_hex(oid));
 }