Merge branch 'sg/strbuf-addbuf-cocci'
[gitweb.git] / archive.c
index bfa9cc20c95d41f133e9d21da5760fdc4bcc4b0d..1f98324a930e39aa1a7c41e78b4fcd6450899c66 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -36,8 +36,8 @@ void init_archivers(void)
 }
 
 static void format_subst(const struct commit *commit,
-                         const char *src, size_t len,
-                         struct strbuf *buf)
+                        const char *src, size_t len,
+                        struct strbuf *buf)
 {
        char *to_free = NULL;
        struct strbuf fmt = STRBUF_INIT;
@@ -393,12 +393,12 @@ static void parse_treeish_arg(const char **argv,
                int refnamelen = colon - name;
 
                if (!dwim_ref(name, refnamelen, &oid, &ref))
-                       die("no such ref: %.*s", refnamelen, name);
+                       die(_("no such ref: %.*s"), refnamelen, name);
                free(ref);
        }
 
        if (get_oid(name, &oid))
-               die("Not a valid object name");
+               die(_("not a valid object name: %s"), name);
 
        commit = lookup_commit_reference_gently(ar_args->repo, &oid, 1);
        if (commit) {
@@ -411,7 +411,7 @@ static void parse_treeish_arg(const char **argv,
 
        tree = parse_tree_indirect(&oid);
        if (tree == NULL)
-               die("not a tree object");
+               die(_("not a tree object: %s"), oid_to_hex(&oid));
 
        if (prefix) {
                struct object_id tree_oid;
@@ -421,7 +421,7 @@ static void parse_treeish_arg(const char **argv,
                err = get_tree_entry(&tree->object.oid, prefix, &tree_oid,
                                     &mode);
                if (err || !S_ISDIR(mode))
-                       die("current working directory is untracked");
+                       die(_("current working directory is untracked"));
 
                tree = parse_tree_indirect(&tree_oid);
        }