From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Doc: clarify that pack-objects makes packs, plural
Date: Tue, 22 Aug 2017 12:56:25 -0700 [thread overview]
Message-ID: <xmqqbmn72x7a.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170822182242.20862-1-jonathantanmy@google.com> (Jonathan Tan's message of "Tue, 22 Aug 2017 11:22:42 -0700")
Jonathan Tan <jonathantanmy@google.com> writes:
> The documentation for pack-objects describes that it creates "a packed
> archive of objects", which is confusing because it may create multiple
> packs if --max-pack-size is set. Update the documentation to clarify
> this.
>
> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
> ---
> It took me quite some time before I realized that pack-objects actually
> may write multiple packs, the opening lines of the doc confusing me.
> Here's a doc update.
> ---
I have a mixed feeling about this one.
Yes, the command _can_ be told to split a packfile into multiple
with an option, but the actual benefit of doing so is rather
dubious. On boxes with smaller address space, I thought windowed
mmap access into large packfiles work just fine. I also think the
motivation behind the "max-size" thing was to split into smaller
pieces so that sneaker-netting on multiple CD-ROMs becomes easier or
something (silly) like that---there should be a more suitable tool
that is not specific to Git for such usecase, I would imagine.
So I am OK with "and writes either one or more" in the description,
but I'd prefer to see that "--max-pack-size" thing gets described as
an aberration, not a norm.
IOW,
- I think the "NAME" part that gives a single line summary of what
the command is about can and should stay as before. A single
archive is the norm, and we do not particularly recommend people
to think it is a good idea to produce multiple packfiles.
- The change in this patch for description part, which should give
a fairly complete view of what it can do, is good.
- The change for 'base-name' documentation that stresses that
.pack/.idx come in pairs and share the same <SHA-1> is good.
- There should be an update to say max-pack-size is not something
normal users would ever want.
For the last one, perhaps something like this:
Documentation/git-pack-objects.txt | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index 8973510a41..3aa6234501 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -108,9 +108,13 @@ base-name::
is taken from the `pack.windowMemory` configuration variable.
--max-pack-size=<n>::
- Maximum size of each output pack file. The size can be suffixed with
+ In unusual scenarios, you may not be able to create files
+ larger than certain size on your filesystem, and this option
+ can be used to tell the command to split the output packfile
+ into multiple independent packfiles and what the maximum
+ size of each packfile is. The size can be suffixed with
"k", "m", or "g". The minimum size allowed is limited to 1 MiB.
- If specified, multiple packfiles may be created, which also
+ This option
prevents the creation of a bitmap index.
The default is unlimited, unless the config variable
`pack.packSizeLimit` is set.
next prev parent reply other threads:[~2017-08-22 19:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 18:22 [PATCH] Doc: clarify that pack-objects makes packs, plural Jonathan Tan
2017-08-22 19:56 ` Junio C Hamano [this message]
2017-08-23 0:40 ` [PATCH v2] " Jonathan Tan
2017-08-23 21:22 ` [PATCH] " Jeff King
2017-08-24 7:27 ` Jacob Keller
2017-08-24 13:38 ` Jeff King
2017-08-24 19:09 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbmn72x7a.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).