]> git.ipfire.org Git - thirdparty/git.git/blobdiff - path.c
Merge branch 'ma/doc-diff-usage-fix'
[thirdparty/git.git] / path.c
diff --git a/path.c b/path.c
index 34f0f98349a6eccd462614cdf143bb031ca348c8..03ab712839a7878e3d3b5d79c698f4e2bb29c8b1 100644 (file)
--- a/path.c
+++ b/path.c
@@ -108,6 +108,7 @@ struct common_dir {
 
 static struct common_dir common_list[] = {
        { 0, 1, 0, "branches" },
+       { 0, 1, 0, "common" },
        { 0, 1, 0, "hooks" },
        { 0, 1, 0, "info" },
        { 0, 0, 1, "info/sparse-checkout" },
@@ -118,6 +119,7 @@ static struct common_dir common_list[] = {
        { 0, 1, 0, "objects" },
        { 0, 1, 0, "refs" },
        { 0, 1, 1, "refs/bisect" },
+       { 0, 1, 1, "refs/worktree" },
        { 0, 1, 0, "remotes" },
        { 0, 1, 0, "worktrees" },
        { 0, 1, 0, "rr-cache" },
@@ -383,7 +385,7 @@ static void adjust_git_path(const struct repository *repo,
                strbuf_splice(buf, 0, buf->len,
                              repo->index_file, strlen(repo->index_file));
        else if (dir_prefix(base, "objects"))
-               replace_dir(buf, git_dir_len + 7, repo->objects->objectdir);
+               replace_dir(buf, git_dir_len + 7, repo->objects->odb->path);
        else if (git_hooks_path && dir_prefix(base, "hooks"))
                replace_dir(buf, git_dir_len + 5, git_hooks_path);
        else if (repo->different_commondir)
@@ -1369,7 +1371,7 @@ only_spaces_and_periods:
                        saw_tilde = 1;
                } else if (i >= 6)
                        return 0;
-               else if (name[i] 0) {
+               else if (name[i] & 0x80) {
                        /*
                         * We know our needles contain only ASCII, so we clamp
                         * here to make the results of tolower() sane.