Re: [PATCH v2 1/2] attr: add attr.tree for setting the treeish to read attributes from
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 4, 2023, 19:58 UTC
- Message-ID
- <xmqqfs2qp3bg.fsf@gitster.g>
- In-Reply-To
- <446bce03a96836f35f94e9ef8548cf4a2b041ba8.1696443502.git.gitgitgadget@gmail.com>
"John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 9 quoted lines
> From: John Cai <johncai86@gmail.com> > > 44451a2e5e (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.
Hmph, I wonder if we want to go all the way to emulate how the mailmap.blob was done, including
- Default the value of attr.tree to HEAD in a bare repository;
- Notice but ignore errors if the attr.tree does not point at a tree object, and pretend as if attr.tree specified an empty tree;
which does not seem to be in this patch. With such a change, probably we do not even need [2/2] of the series, perhaps?