i18n: simplify numeric error reporting
[gitweb.git] / path.c
diff --git a/path.c b/path.c
index 259aeed846bd3dac8e10cde30a22ec1ad8697a63..fe3c4d96c6d82b2c8f4e1553f1a52e410c8c02d3 100644 (file)
--- a/path.c
+++ b/path.c
@@ -380,6 +380,8 @@ static void adjust_git_path(struct strbuf *buf, int git_dir_len)
                              get_index_file(), strlen(get_index_file()));
        else if (git_db_env && dir_prefix(base, "objects"))
                replace_dir(buf, git_dir_len + 7, get_object_directory());
+       else if (git_hooks_path && dir_prefix(base, "hooks"))
+               replace_dir(buf, git_dir_len + 5, git_hooks_path);
        else if (git_common_dir_env)
                update_common_dir(buf, git_dir_len, NULL);
 }
@@ -483,7 +485,7 @@ static void do_submodule_path(struct strbuf *buf, const char *path,
                strbuf_addstr(buf, git_dir);
        }
        strbuf_addch(buf, '/');
-       strbuf_addstr(&git_submodule_dir, buf->buf);
+       strbuf_addbuf(&git_submodule_dir, buf);
 
        strbuf_vaddf(buf, fmt, args);