git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Jason St. John" <jstjohn@purdue.edu>
Cc: git@vger.kernel.org, Marco Costalba <mcostalba@gmail.com>
Subject: Re: [PATCH 1/4] Minor grammatical fixes in "git log" man page
Date: Fri, 8 Nov 2013 17:00:48 -0800	[thread overview]
Message-ID: <20131109010048.GG10302@google.com> (raw)
In-Reply-To: <1383957130-2979-1-git-send-email-jstjohn@purdue.edu>

Hi,

Jason St. John wrote:

> git-log.txt: grammatical fixes under --log-size option

Thanks.

[...]
> --- a/Documentation/git-log.txt
> +++ b/Documentation/git-log.txt
> @@ -56,10 +56,10 @@ Note that this affects all diff-based output types, e.g. those
>  produced by --stat etc.
> 
>  --log-size::
> -	Before the log message print out its size in bytes. Intended
> +	Before the log message, print out its size in bytes. Intended
>  	mainly for porcelain tools consumption. If Git is unable to
> -	produce a valid value size is set to zero.
> -	Note that only message is considered, if also a diff is shown
> +	produce a valid value size, this is set to zero.
> +	Note that only message is considered. Also, if a diff is shown,
>  	its size is not included.

I have no idea what this option does, before or after the change.

The commit that introduced --log-size says the following in its
change description:

	$ git log --grep=--log-size
	commit 9fa3465d6be83c08ed24762c82eb33cb005729f3
	Author: Marco Costalba <mcostalba@gmail.com>
	Date:   Fri Jul 20 20:15:13 2007 +0200

	    Add --log-size to git log to print message size

	    With this option git-log prints log message size
	    just before the corresponding message.

	    Porcelain tools could use this to speedup parsing
	    of git-log output.

	    Note that size refers to log message only. If also
	    patch content is shown its size is not included.

Perhaps some of the above could make it into a clearer description?
E.g.,

	--log-size::
		Include a line "log size <number>" in the output for each
		commit, where <number> is the length of that commit's
		message in bytes.  Intended to speed up tools that
		read log messages from 'git log' output by allowing them
		to allocate space in advance.

The commit introducing --log-size also says:

	    In case it is not possible to know the size upfront
	    size value is set to zero.

Is this still true?  When is it not possible to know the size up
front?

The implementation of --log-size is

	if (opt->show_log_size) {
		printf("log size %i\n", (int)msgbuf.len);
		graph_show_oneline(opt->graph);
	}

What happens if the commit message is long enough to overflow a 32-bit
integer?  Is that impossible for other reasons?  If it is possible,
(not about this patch) should this be using a 64-bit integer to print
instead?

Thanks and hope that helps,
Jonathan

  reply	other threads:[~2013-11-09  1:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09  0:32 [PATCH 1/4] Minor grammatical fixes in "git log" man page Jason St. John
2013-11-09  1:00 ` Jonathan Nieder [this message]
2013-11-11 17:59   ` Junio C Hamano

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=20131109010048.GG10302@google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jstjohn@purdue.edu \
    --cc=mcostalba@gmail.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).