From: "Mihai Capotă" <mihai@mihaic.ro>
To: gitster@pobox.com
Cc: git@vger.kernel.org
Subject: [PATCH] count-objects doc: document use of kibibytes
Date: Fri, 5 Apr 2013 11:39:23 +0200 [thread overview]
Message-ID: <1365154763-9875-1-git-send-email-mihai@mihaic.ro> (raw)
In-Reply-To: <7vvc82jm77.fsf@alter.siamese.dyndns.org>
Document the use of kibibytes, not kilobytes, in the output of count-objects
and the reason for not correcting the output.
Also, make cvsimport comment and variable name reflect unit actually used.
Signed-off-by: Mihai Capotă <mihai@mihaic.ro>
---
Documentation/git-count-objects.txt | 7 +++++++
git-cvsimport.perl | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-count-objects.txt b/Documentation/git-count-objects.txt
index 23c80ce..d562dad 100644
--- a/Documentation/git-count-objects.txt
+++ b/Documentation/git-count-objects.txt
@@ -26,6 +26,13 @@ OPTIONS
and number of objects that can be removed by running
`git prune-packed`.
+
+BUGS
+----
+Consumed space is actually expressed in kibibytes, not kilobytes as stated in
+the output. The output is kept as it is for compatibility reasons.
+
+
GIT
---
Part of the linkgit:git[1] suite
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 73d367c..6803f04 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -1126,12 +1126,12 @@ unless ($opt_P) {
}
# The heuristic of repacking every 1024 commits can leave a
-# lot of unpacked data. If there is more than 1MB worth of
+# lot of unpacked data. If there is more than 1MiB worth of
# not-packed objects, repack once more.
my $line = `git count-objects`;
if ($line =~ /^(\d+) objects, (\d+) kilobytes$/) {
- my ($n_objects, $kb) = ($1, $2);
- 1024 < $kb
+ my ($n_objects, $kib) = ($1, $2);
+ 1024 < $kib
and system(qw(git repack -a -d));
}
--
1.7.9.5
next prev parent reply other threads:[~2013-04-06 16:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 11:43 [PATCH] count-objects: output "KiB" instead of "kilobytes" Mihai Capotă
2013-04-02 17:41 ` Junio C Hamano
2013-04-02 22:01 ` Junio C Hamano
2013-04-03 6:27 ` Mihai Capotă
2013-04-03 12:48 ` [PATCH v2] " Mihai Capotă
2013-04-03 14:38 ` Junio C Hamano
2013-04-04 13:18 ` Mihai Capotă
2013-04-04 16:27 ` Junio C Hamano
2013-04-05 9:38 ` Mihai Capotă
2013-04-05 9:39 ` Mihai Capotă [this message]
2013-04-05 20:31 ` Antoine Pelisse
2013-04-08 18:18 ` [PATCH 1/2] progress: create public humanize() to show sizes Antoine Pelisse
2013-04-08 18:18 ` [PATCH 2/2] count-objects: add -H option to humanize sizes Antoine Pelisse
2013-04-08 21:40 ` [PATCH 1/2] progress: create public humanize() to show sizes Junio C Hamano
2013-04-10 19:03 ` [PATCH 1/2] strbuf: create strbuf_humanize() to show byte sizes Antoine Pelisse
2013-04-10 19:03 ` [PATCH 2/2] count-objects: add -H option to humanize sizes Antoine Pelisse
2013-04-10 19:43 ` [PATCH 1/2] strbuf: create strbuf_humanize() to show byte sizes Jonathan Nieder
2013-04-10 20:00 ` Antoine Pelisse
2013-04-10 19:57 ` Junio C Hamano
2013-04-10 20:12 ` Antoine Pelisse
2013-04-08 21:55 ` [PATCH 1/2] progress: create public humanize() to show sizes Eric Sunshine
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=1365154763-9875-1-git-send-email-mihai@mihaic.ro \
--to=mihai@mihaic.ro \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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).