Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/attr.h
diff options
context:
space:
mode:
authorJohn Cai <johncai86@gmail.com>2023-10-13 20:39:30 +0300
committerJunio C Hamano <gitster@pobox.com>2023-10-13 21:43:29 +0300
commit9f9c40cf34c29d4ad700d9869435d159056fa6fb (patch)
tree8e3b138390a996f68831accaeebe2fb9488f2382 /attr.h
parent2386535511d1181afd4e892e2a866ffe5e1d7d21 (diff)
attr: add attr.tree for setting the treeish to read attributes from
44451a2 (attr: teach "--attr-source=<tree>" global option to "git", 2023-05-06) provided the ability to pass in a treeish as the attr source. In the context of serving Git repositories as bare repos like we do at GitLab however, it would be easier to point --attr-source to HEAD for all commands by setting it once. Add a new config attr.tree that allows this. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'attr.h')
-rw-r--r--attr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/attr.h b/attr.h
index 2b745df405..127998ae01 100644
--- a/attr.h
+++ b/attr.h
@@ -236,4 +236,6 @@ const char *git_attr_global_file(void);
/* Return whether the system gitattributes file is enabled and should be used. */
int git_attr_system_is_enabled(void);
+extern const char *git_attr_tree;
+
#endif /* ATTR_H */