From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: Re: Possible regression in git-rev-list --header
Date: Wed, 03 Jan 2007 02:10:27 -0800 [thread overview]
Message-ID: <7vodpgpgj0.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <e5bfff550701030121n700fab25x63278457c884a3f7@mail.gmail.com> (Marco Costalba's message of "Wed, 3 Jan 2007 10:21:21 +0100")
"Marco Costalba" <mcostalba@gmail.com> writes:
> On 1/1/07, Junio C Hamano <junkio@cox.net> wrote:
>> "Marco Costalba" <mcostalba@gmail.com> writes:
>>
>> > 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,
>>
>> They are more like 'other' headers. Nobody said the set of
>> headers are cast in stone forever. The only things parsers
>> safely can assume are that the original four kinds come at the
>> beginning in the above order, and there is a blank line that
>> separates headers and the body.
>>
>
> I'm cooking the qgit parser fix, please confirm the following
> assumption is correct:
>
> When git-rev-list is called with --header option, after the first
> line with the commit sha, the following information is produced
>
> - one line with "tree"
> - an arbitrary amount of "parent" lines
> - one line with "author"
> - one line with "committer"
> - zero or more *non blank* lines with other info, as the encoding
> - one blank line
> - zero or one line with log title
> - zero or more lines with log message
> - a terminating '\0'
I think that is correct, except that rev-list does not even care
the distinction between log title and log message.
I do not think of a reason to change the order of the first four
offhand, so while it might be prudent to prepare the code to
accept them in any order if it is not too much trouble from
purist point of view, I do not think it is necessary in practice
and you should be able to depend on the order in which they
appear. I do not think it would hurt anybody if we right now
declared that other extra headers people have talked about (such
as "notes") should always come after the first four.
next prev parent reply other threads:[~2007-01-03 10:10 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
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 [this message]
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=7vodpgpgj0.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--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.