On 6/11/2018 5:02 PM, Stefan Beller wrote:
Hi Derrick,
On Thu, Jun 7, 2018 at 7:03 AM Derrick Stolee <stolee@xxxxxxxxx> wrote:
This new 'git midx' builtin will be the plumbing access for writing,
reading, and checking multi-pack-index (MIDX) files. The initial
implementation is a no-op.
Let's talk about the name for a second:
.idx files are written by git-index-pack or as part of
git-pack-objects (which just calls write_idx_file as part
of finish_tmp_packfile), and the name actually suggests
it writes the index files. I have a hard time understanding
what the git-midx command does[1].
With both commit graph as well as multi index we introduce
a command that is centered around that concept (similar to
git-remote or git-config that are centered around a concept,
that is closely resembled by a file), but for indexes for packs
it was integrated differently into Git. So I am not sure if I want
to suggest to integrate it into the packfile commands as that
doesn't really fit. But maybe we can have a name that is human
readable instead of the file suffix? Maybe
git multi-pack-index ?
I suppose that eventually this command is not really used by
users as it will be used by other porcelain commands in the
background or even as part of repack/gc so I am not worried
about a long name, but I'd be more worried about understandability.
I'll use "git multi-pack-index" in v2. I'll keep "midx.c" in the root,
though, if that is OK.
[1] While these names are not perfect for the layman, it is okay?
I am sure you are aware of https://git-man-page-generator.lokaltog.net/
I was not, and enjoyed that quite a bit.
Thanks,
-Stolee
new file mode 100644
index 0000000000..2bd886f1a2
--- /dev/null
+++ b/Documentation/git-midx.txt
@@ -0,0 +1,29 @@
+git-midx(1)
+============
+
+NAME
+----
+git-midx - Write and verify multi-pack-indexes (MIDX files).
The reading is done as part of all other commands.
I like to think the 'read' verb is a subset of "verify" because we are
checking for information about the MIDX, and mostly for tests or debugging.
+
+
+SYNOPSIS
+--------
+[verse]
+'git midx' [--object-dir <dir>]
+
+DESCRIPTION
+-----------
+Write or verify a MIDX file.
+
+OPTIONS
+-------
+
+--object-dir <dir>::
+ Use given directory for the location of Git objects. We check
+ <dir>/packs/multi-pack-index for the current MIDX file, and
+ <dir>/packs for the pack-files to index.
+
+
Maybe we could have a SEE ALSO section that points at
the explanation of multi index files?
(c.f. man git-submodule that has a SEE ALSO
gitsubmodules(7), gitmodules(5) explaining concepts(7)
and the file(5))
But as this is plumbing and users should not need to worry about it
this is optional, I would think.
The design document is also in 'Documentation/technical' instead of just
'Documentation/'. Do we have a pattern of linking to the technical
documents?
Thanks,
-Stolee