Thread (51 messages) 51 messages, 8 authors, 2022-12-02

Re: [PATCH 03/30] extensions: add refFormat extension

From: Elijah Newren <hidden>
Date: 2022-11-11 23:39:51

On Mon, Nov 7, 2022 at 10:48 AM Derrick Stolee via GitGitGadget
[off-list ref] wrote:
[...]
One obvious improvement could be a new file format version for the
packed-refs file. Its current plaintext-based format is inefficient due
to storing object IDs as hexadecimal representations instead of in
their raw format. This extra cost will get worse with SHA-256.
In addition, binary searches need to guess a position and scan to find
newlines for a refname entry. A structured binary format could allow for
more compact representation and faster access.
This doesn't parse very well at all.  The scanning is due to refname
entries being of variable length, and changing hexadecimal
representation of object IDs to binary values isn't going to help
that.

I _think_, after re-scanning your RFC cover letter that you had other
ideas to allow a binary search in order to read a single ref's value,
and that the juxtaposing of these sentences together leads to an
unfortunate assumption that one change is related to the both goals,
but something extra here to clarify would help.
quoted hunk ↗ jump to hunk
diff --git a/Documentation/config/extensions.txt b/Documentation/config/extensions.txt
index bccaec7a963..ce8185adf53 100644
--- a/Documentation/config/extensions.txt
+++ b/Documentation/config/extensions.txt
@@ -7,6 +7,47 @@ Note that this setting should only be set by linkgit:git-init[1] or
 linkgit:git-clone[1].  Trying to change it after initialization will not
 work and will produce hard-to-diagnose issues.

+extensions.refFormat::
+       Specify the reference storage mechanisms used by the repoitory as a
+       multi-valued list. The acceptable values are `files` and `packed`.
+       If not specified, the list of `files` and `packed` is assumed.
This sentence doesn't parse for me.
+       It
+       is an error to specify this key unless `core.repositoryFormatVersion`
+       is 1.
...is at least 1?  Or are we trying to be incompatible with potential
future core.repositoryFormatVersion values?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help