From: Junio C Hamano <gitster@pobox.com>
To: eletuchy@gmail.com
Cc: git@vger.kernel.org, eletuchy@facebook.com,
Eugene Letuchy <eugene@facebook.com>
Subject: Re: [PATCH] adds --date=raw support to git blame and related documentation
Date: Mon, 23 Feb 2009 09:10:54 -0800 [thread overview]
Message-ID: <7vprh9t6xt.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1235379429-20934-1-git-send-email-eletuchy@gmail.com> (eletuchy@gmail.com's message of "Mon, 23 Feb 2009 00:57:09 -0800")
eletuchy@gmail.com writes:
> From: Eugene Letuchy <eugene@facebook.com>
>
> In the wake of Linus' 7dff9b3, git blame --date support needs to
> incorporate --date=raw in addition to the previously supported
> date formats.
Thanks, but I do not understand what you meant by the following two lines:
> Test: > git grep relative | grep iso | grep -v raw
> > git blame --date=raw builtin-blame.c
With the patch to add --date=raw format already on 'master', I'd prefer a
reroll of the original patch (it needs a fix for the config "don't ignore
a misconfiguration" bug Peff pointed out anyway) with this documentation
update patch squashed in.
> diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt
> index e6717af..1316d4e 100644
> --- a/Documentation/blame-options.txt
> +++ b/Documentation/blame-options.txt
> @@ -36,7 +36,7 @@ of lines before or after the line given by <start>.
> Show long rev (Default: off).
>
> -t::
> - Show raw timestamp (Default: off).
> + Synomym for --date=raw (Default: off).
This is interesting. It suggests that we should internally get rid of
show_raw_time variable (and need to error out when --date= and -t options
are given at the same time, as they are mutually incompatible).
But do -t and --date=raw really behave identically? I think they should
but I didn't check.
> diff --git a/builtin-blame.c b/builtin-blame.c
> index 48cedfd..bb0d20b 100644
> --- a/builtin-blame.c
> +++ b/builtin-blame.c
> @@ -2288,12 +2288,16 @@ parse_done:
> case DATE_RELATIVE:
> blame_date_width = sizeof("14 minutes ago");
> break;
> + case DATE_RAW:
> + blame_date_width = sizeof("1235155266 -0800");
> + output_option |= OUTPUT_RAW_TIMESTAMP;
> + break;
I'd prefer it to see a same timestamp used consistently here. You seem to
have used "Thu, 19 Oct 2006 16:00:04 -0700" for other case arms (I do not
know what significant things happened at that time) and what I queued in
'pu' has sizeof("1161298804 -0700") there instead.
> case DATE_LOCAL:
> case DATE_NORMAL:
> blame_date_width = sizeof("Thu Oct 19 16:00:04 2006 -0700");
> break;
> }
> - blame_date_width -= 1; /* strip the null */
> + blame_date_width -= 1; /* strip the terminating null */
The character with byte value 0 is called NUL.
Thanks.
next prev parent reply other threads:[~2009-02-23 17:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-23 8:57 [PATCH] adds --date=raw support to git blame and related documentation eletuchy
2009-02-23 17:10 ` Junio C Hamano [this message]
2009-02-23 17:48 ` Eugene Letuchy
2009-02-24 1:35 ` 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=7vprh9t6xt.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=eletuchy@facebook.com \
--cc=eletuchy@gmail.com \
--cc=eugene@facebook.com \
--cc=git@vger.kernel.org \
/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.