From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: "Jakub Narebski" <jnareb@gmail.com>,
"Santi Béjar" <sbejar@gmail.com>,
git@vger.kernel.org
Subject: Re: [BUG] Empty reflogs and "git log -g"
Date: Thu, 08 Feb 2007 15:18:35 -0800 [thread overview]
Message-ID: <7vveicw850.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0702082040390.22628@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Thu, 8 Feb 2007 20:46:43 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> On Thu, 8 Feb 2007, Jakub Narebski wrote:
>
>> StGIT used to produce no reflog messages; I don't know if this has
>> improved. But you can have old reflog entries with empty messages; git
>> log -g should deal with them IMHO.
>
> I just tried. An empty string is not enough. The tab before the message
> has to be lacking, too.
>
> Here's a small patch, if you have to have it.
I think this is necessary for v1.5.0. I'd appreciate a properly
signed-off log message.
>
> ---
>
> refs.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/refs.c b/refs.c
> index 7e07fc4..ba5bd2d 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -1189,12 +1189,14 @@ int for_each_reflog_ent(const char *ref, each_reflog_ent_fn fn, void *cb_data)
> !message || message[0] != ' ' ||
> (message[1] != '+' && message[1] != '-') ||
> !isdigit(message[2]) || !isdigit(message[3]) ||
> - !isdigit(message[4]) || !isdigit(message[5]) ||
> - message[6] != '\t')
> + !isdigit(message[4]) || !isdigit(message[5]))
> continue; /* corrupt? */
> email_end[1] = '\0';
> tz = strtol(message + 1, NULL, 10);
> - message += 7;
> + if (message[6] != '\t')
> + message += 6;
> + else
> + message += 7;
> ret = fn(osha1, nsha1, buf+82, timestamp, tz, message, cb_data);
> if (ret)
> break;
next prev parent reply other threads:[~2007-02-08 23:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-08 1:21 [BUG] Empty reflogs and "git log -g" Santi Béjar
2007-02-08 7:25 ` Santi Béjar
2007-02-08 19:36 ` Johannes Schindelin
2007-02-08 19:49 ` Nicolas Pitre
2007-02-08 20:02 ` Johannes Schindelin
2007-02-08 19:22 ` Johannes Schindelin
2007-02-08 19:37 ` Jakub Narebski
2007-02-08 19:46 ` Johannes Schindelin
2007-02-08 23:18 ` Junio C Hamano [this message]
2007-02-08 23:59 ` [PATCH] for_each_reflog_ent: be forgiving about missing message Johannes Schindelin
2007-02-09 0:28 ` [PATCH] log --reflog: use dwim_log Johannes Schindelin
2007-02-09 3:43 ` Junio C Hamano
2007-02-09 7:19 ` 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=7vveicw850.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=sbejar@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 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.