git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marco Costalba" <mcostalba@gmail.com>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Cc: "Junio C Hamano" <junkio@cox.net>, git@vger.kernel.org
Subject: Re: Possible regression in git-rev-list --header
Date: Sun, 31 Dec 2006 16:43:13 +0100	[thread overview]
Message-ID: <e5bfff550612310743t4ca1b017ubceddffafd06ac59@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0612311613180.22628@wbgn013.biozentrum.uni-wuerzburg.de>

On 12/31/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>
> Further, if you rely on parsing being super-fast, why not just parse
> _only_ the header information that you actually need? The header still
> consists of
>
>         - exactly one "tree",
>         - an arbitrary amount of "parent" lines,
>         - exactly one "author", and
>         - exactly one "committer" line
>
> After that may come optional headers,

If you intorduce the concept of an 'optional header part' you
logically and naturally _may_ also introduce the concept of disabling
the display of _that_ optional header, or better, to keep back
compatibility (I just remaind that's more then one year and an half
that git-rev-list works in that way!) you may accept the concept of an
option to show the additional optional header part. That's just what
I'm asking, no more no less.

>but by that time you should
> _already_ have stopped parsing! And the order is fixed already
> (parse_commit_buffer() relies on it).
>
> After all, you have an initial parsing for the purpose of organizing the
> commits, and you can have _another_ for the purpose of displaying the
> message (you can remember the offset where the first parsing stopped to
> accelerate the second). The latter parsing should be done individually,
> when displaying the commit.
>

The problem with your proposed algorithm is that you don't have _one_
commit but a sequence of commits to parse, so when you have parsed
until the committer line you must need to know where the next commit
starts, IOW you have to find the next '\0', that's what I was trying
to expose in my previous e-mail postscriptum.


Thanks
Marco

  reply	other threads:[~2006-12-31 15:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-30 17:56 Possible regression in git-rev-list --header Marco Costalba
2006-12-30 18:30 ` Jakub Narebski
2006-12-30 18:57 ` Johannes Schindelin
2006-12-30 20:20   ` Junio C Hamano
2006-12-30 22:19     ` Junio C Hamano
2006-12-31  1:13       ` Johannes Schindelin
2006-12-31  1:45         ` Junio C Hamano
2006-12-31 11:45           ` Marco Costalba
2006-12-31 15:27             ` Johannes Schindelin
2006-12-31 15:43               ` Marco Costalba [this message]
2007-01-01  3:21                 ` Junio C Hamano
2007-01-02 21:32                   ` Johannes Schindelin
2007-01-02 22:13                     ` Junio C Hamano
2007-01-02 22:28                       ` Johannes Schindelin
2007-01-02 22:29                       ` Marco Costalba
2007-01-03  9:21                   ` Marco Costalba
2007-01-03 10:10                     ` Junio C Hamano
2007-01-03 10:21                     ` Lars Hjemli
2007-01-03 10:35                       ` Marco Costalba
2007-01-03 11:14                         ` Lars Hjemli
2007-01-04 15:21                           ` Andreas Ericsson
2007-01-04 15:18                         ` Andreas Ericsson
2007-01-03 10:38                       ` Lars Hjemli
2006-12-31  0:37     ` Johannes Schindelin
2006-12-30 20:22   ` [PATCH] Move commit reencoding parameter parsing to revision.c Junio C Hamano
2006-12-31  1:10     ` Johannes Schindelin

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=e5bfff550612310743t4ca1b017ubceddffafd06ac59@mail.gmail.com \
    --to=mcostalba@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).