git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] count-objects doc: document use of kibibytes

From
Mihai Capotă <mihai@mihaic.ro>
Date
Apr 5, 2013, 09:39 UTC
Message-ID
<1365154763-9875-1-git-send-email-mihai@mihaic.ro>
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
Previous: Mihai CapotăNext: Antoine Pelisse
Message 10 of 21 in “count-objects: output "KiB" instead of "kilobytes"”
  1. count-objects: output "KiB" instead of "kilobytes"Mihai Capotă, Apr 2, 2013
  2. Junio C HamanoApr 2, 2013
  3. Junio C HamanoApr 2, 2013
  4. Mihai CapotăApr 3, 2013
  5. count-objects: output "KiB" instead of "kilobytes"Mihai Capotă, Apr 3, 2013
  6. Junio C HamanoApr 3, 2013
  7. Mihai CapotăApr 4, 2013
  8. Junio C HamanoApr 4, 2013
  9. Mihai CapotăApr 5, 2013
  10. count-objects doc: document use of kibibytesMihai Capotă, Apr 5, 2013
  11. Antoine PelisseApr 5, 2013
  12. 1/2 progress: create public humanize() to show sizesAntoine Pelisse, Apr 8, 2013
  13. 2/2 count-objects: add -H option to humanize sizesAntoine Pelisse, Apr 8, 2013
  14. Junio C HamanoApr 8, 2013
  15. 1/2 strbuf: create strbuf_humanize() to show byte sizesAntoine Pelisse, Apr 10, 2013
  16. 2/2 count-objects: add -H option to humanize sizesAntoine Pelisse, Apr 10, 2013
  17. Jonathan NiederApr 10, 2013
  18. Antoine PelisseApr 10, 2013
  19. Junio C HamanoApr 10, 2013
  20. Antoine PelisseApr 10, 2013
  21. Eric SunshineApr 8, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.