From: Petr Baudis <pasky@suse.cz>
To: Marcus Griep <marcus@griep.us>
Cc: Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 3/3] count-objects: add human-readable size option
Date: Fri, 15 Aug 2008 00:37:40 +0200 [thread overview]
Message-ID: <20080814223740.GD10544@machine.or.cz> (raw)
In-Reply-To: <1218752308-3173-4-git-send-email-marcus@griep.us>
On Thu, Aug 14, 2008 at 06:18:28PM -0400, Marcus Griep wrote:
> @@ -21,9 +21,14 @@ OPTIONS
> --verbose::
> In addition to the number of loose objects and disk
> space consumed, it reports the number of in-pack
> - objects, number of packs, and number of objects that can be
> - removed by running `git prune-packed`.
> -
> + objects, number of packs, disk space consumed by those packs
> + and number of objects that can be removed by running
> + `git prune-packed`.
> +
> +-H::
> +--human-sizes::
> + Displays sizes reported by `--verbose` in a more
> + human-readable format. (e.g. 22M or 1.5G)
>
> Author
> ------
Can you guess what would I bug you about? ;-)
> - printf("size-pack: %lu\n", size_pack / 1024);
> + printf("size-pack: ");
> + if (human_readable) {
> + struct strbuf sb;
> + strbuf_init(&sb, 0);
> + strbuf_append_human_readable(&sb, size_pack,
> + 0, 0, "", 0);
> + printf("%s\n", sb.buf);
> + }
> + else
> + printf("%lu\n", size_pack / 1024);
If it's non-human-readable anyway, why are you dividing this by 1024? At
any rate, it is not obvious at all that the size-pack is not actually
size-pack but size-pack/1024. You should either add the (fixed) unit
string behind or name it size-pack-kb - or just not divide it at all?
This also applies to PATCH1/3 in case it would get applied but the other
two wouldn't.
--
Petr "Pasky" Baudis
The next generation of interesting software will be done
on the Macintosh, not the IBM PC. -- Bill Gates
next prev parent reply other threads:[~2008-08-14 22:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-14 22:18 [PATCH v2 0/3] count-objects size and strbuf human-readable Marcus Griep
2008-08-14 22:18 ` [PATCH v2 1/3] count-objects: Add total pack size to verbose output Marcus Griep
2008-08-14 22:18 ` [PATCH v2 2/3] strbuf: Add method to convert byte-size to human readable form Marcus Griep
2008-08-14 22:18 ` [PATCH v2 3/3] count-objects: add human-readable size option Marcus Griep
2008-08-14 22:37 ` Petr Baudis [this message]
2008-08-14 23:52 ` Marcus Griep
2008-08-15 0:10 ` Junio C Hamano
2008-08-14 22:34 ` [PATCH v2 2/3] strbuf: Add method to convert byte-size to human readable form Petr Baudis
2008-08-14 23:04 ` Junio C Hamano
2008-08-14 23:24 ` Petr Baudis
2008-08-14 23:40 ` Junio C Hamano
2008-08-15 0:53 ` Marcus Griep
2008-08-15 0:46 ` Marcus Griep
2008-08-15 0:52 ` Shawn O. Pearce
2008-08-15 4:20 ` [PATCH v3 1/3] count-objects: Add total pack size to verbose output Marcus Griep
2008-08-15 4:20 ` [PATCH v3 2/3] strbuf: Add method to convert byte-size to human readable form Marcus Griep
2008-08-15 4:20 ` [PATCH v3 3/3] count-objects: add human-readable size option Marcus Griep
2008-08-15 15:47 ` [PATCH v3.1 1/3] count-objects: Add total pack size to verbose output Marcus Griep
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=20080814223740.GD10544@machine.or.cz \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=marcus@griep.us \
/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).