From: Daniel DeLorme <dan-ml@dan42.com>
To: git@vger.kernel.org
Subject: [PATCH] git verify-pack -vs
Date: Sat, 25 Sep 2010 14:45:29 +0900 [thread overview]
Message-ID: <4C9D8C79.2040101@dan42.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
According to git help verify-pack, when --stat-only and --verbose are
used together the "list of objects is also shown." But in fact it is
not; `git verify-pack -sv` has the same behavior as `git verify-pack -s`
It seems like a trivial mistake in verify-pack.c (the verbose behavior
is triggered with !stat_only) so here is a patch that makes the behavior
fit the manual's description.
--
Daniel DeLorme
[-- Attachment #2: verify-pack.patch --]
[-- Type: text/x-patch, Size: 1099 bytes --]
diff --git a/builtin/verify-pack.c b/builtin/verify-pack.c
index b6079ae..ad67eb8 100644
--- a/builtin/verify-pack.c
+++ b/builtin/verify-pack.c
@@ -13,6 +13,7 @@ static void show_pack_info(struct packed_git *p, unsigned int flags)
{
uint32_t nr_objects, i;
int cnt;
+ int verbose = flags & VERIFY_PACK_VERBOSE;
int stat_only = flags & VERIFY_PACK_STAT_ONLY;
unsigned long chain_histogram[MAX_CHAIN+1], baseobjects;
@@ -36,16 +37,16 @@ static void show_pack_info(struct packed_git *p, unsigned int flags)
type = packed_object_info_detail(p, offset, &size, &store_size,
&delta_chain_length,
base_sha1);
- if (!stat_only)
+ if (verbose)
printf("%s ", sha1_to_hex(sha1));
if (!delta_chain_length) {
- if (!stat_only)
+ if (verbose)
printf("%-6s %lu %lu %"PRIuMAX"\n",
type, size, store_size, (uintmax_t)offset);
baseobjects++;
}
else {
- if (!stat_only)
+ if (verbose)
printf("%-6s %lu %lu %"PRIuMAX" %u %s\n",
type, size, store_size, (uintmax_t)offset,
delta_chain_length, sha1_to_hex(base_sha1));
reply other threads:[~2010-09-25 6:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C9D8C79.2040101@dan42.com \
--to=dan-ml@dan42.com \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).