All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Mihai Capotă" <mihai@mihaic.ro>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] count-objects: output "KiB" instead of "kilobytes"
Date: Thu, 04 Apr 2013 09:27:08 -0700	[thread overview]
Message-ID: <7vvc82jm77.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CADyhzG3HJhrXJAoTfyHUsg=8ZmUUwUgrNfUiLHF0Ws=gSERAqw@mail.gmail.com> ("Mihai Capotă"'s message of "Thu, 4 Apr 2013 15:18:25 +0200")

Mihai Capotă <mihai@mihaic.ro> writes:

> The git manual contains an explicit warning about the output of a
> porcelain command changing: "The interface to Porcelain commands on
> the other hand are subject to change in order to improve the end user
> experience."

Yeah, I know that, as I wrote it ;-)

Aside from count-object being not exactly a Porcelain, the statement
does not give us a blank check to make random changes as we see fit.
There needs to be a clear improvement.

I am just having a hard time weighing the benefit of using more
accurate kibibytes over kilobytes and the possible downside of
breaking other peoples' tools.

Perhaps it would be alright if the change was accompanied by a
warning in the Release Notes to say something like:

        If you have scripts that decide when to run "git repack" by
	parsing the output from "git count-objects", this release
	may break them.  Sorry about that.  One of the scripts
	shipped by git-core itself also had to be adjusted.  The
	command reports the total diskspace used to store loose
	objects in kibibytes, but it was labelled as "kilobytes".
	The number now is shown with "KiB", e.g. "6750 objects,
	50928 KiB".

	You may want to consider updating such scripts to always
	call "git gc --auto" to let it decide when to repack for
	you.

Also, I suspect that for the purpose of this exact output field,
nobody cares the difference between kibibytes and kilobytes.
Depending on the system, we add up either st.st_blocks or st.st_size
and the result is not that exact as "how much diskspace is
consumed".

  reply	other threads:[~2013-04-04 16:27 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 [this message]
2013-04-05  9:38           ` Mihai Capotă
2013-04-05  9:39           ` [PATCH] count-objects doc: document use of kibibytes Mihai Capotă
2013-04-05 20:31           ` [PATCH v2] count-objects: output "KiB" instead of "kilobytes" 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=7vvc82jm77.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mihai@mihaic.ro \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.