Merge branch 'rs/unpack-trees-reduce-file-scope-global'
[gitweb.git] / path.c
diff --git a/path.c b/path.c
index ba60c9849ef7dcc849b2014fb049e3589c6b32e3..a8e72955f6f28f6e27e7faeee144f4f3ed492c83 100644 (file)
--- a/path.c
+++ b/path.c
@@ -381,6 +381,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);
 }