From: Linus Torvalds <torvalds@osdl.org>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Junio C Hamano <junkio@cox.net>,
pasky@ucw.cz, braddr@puremagic.com, nico@cam.org,
david@dgreaves.com, Git Mailing List <git@vger.kernel.org>
Subject: Re: Summary of core GIT while you are away.
Date: Wed, 25 May 2005 18:45:14 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0505251826460.2307@ppc970.osdl.org> (raw)
In-Reply-To: <20050526004411.GA12360@vrfy.org>
On Thu, 26 May 2005, Kay Sievers wrote:
>
> On Mon, May 16, 2005 at 09:10:10AM -0700, Linus Torvalds wrote:
> >
> > Then you could just do
> >
> > git-rev-list -v --header HEAD | grep -z 'author[^\n]*Linus'
> >
> > to tell it to do the "verbose" thing (only showing the header of the
> > commit, not the whole message), and grep for "Linus" in the author line.
>
> What happened to that idea? That's not already working in some other way I
> missed, right? The pickaxe stuff is nice and was easy to call from the cgi,
> but searching in commit messages would be nice too.
> If it's not going to happen in the git-binaries, I may do it just in the
> cgi itself.
Ok, you twisted my arm. Checked in.
git-rev-list --header HEAD | grep -z 'author[\n]*Linus'
and you will get output that is a series of commits by me (strictly
speaking, that's not true, since the "author" thing might be in the
non-header part).
The format is:
<commit-id> '\n' <commit-msg> '\0'
and if the full commit message is binary and contains NUL bytes in itself
(only crazy people do that, but let's keep in mind that crazy people
exist), we naturally truncate it at the first NUL. This makes it easy to
parse, and is what makes "grep -z" work, for example.
It also has a rudimentary "stop at commit x" function, but I'm not doing
any reachability analysis, so it's purely based on the commit date, and is
thus _not_ equivalent to "git-rev-tree START ^END". I reserve the right to
try to change that behaviour, though, if I decide I (or sombody else ;)
can do a nice incremental reacability thing.
So you can do
git-rev-list --header HEAD v2.6.12-rc5
and it will print out all the commits in date order until it hits
v2.6.12-rc5 (which it won't print out).
The output format is really optimized for something like "git log" or
"gitweb". I suspect it's pretty much perfect for doing the "last 10"
things, without having to do "git-cat-file" for each commit.
Oh, and I considered adding a "--header-lines=c" which limits the header
printout to 'c' lines (probably starting at where the free-form thing
starts, so that "--header-lines=0" would print out just the fixed-format
header of the commit messages.
(This is slightly different from what I initially envisioned, which had
"-v" and "--header", and I'm not sure it's better but it ended up being
what I did. If you think my first idea was better, send me a (by now
trivial) patch).
Linus
next prev parent reply other threads:[~2005-05-26 1:42 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-14 10:51 Summary of core GIT while you are away Junio C Hamano
2005-05-16 16:10 ` Linus Torvalds
2005-05-16 21:33 ` rev-list/tree committer/author information Junio C Hamano
2005-05-16 22:19 ` Petr Baudis
2005-05-16 22:35 ` Daniel Barkalow
2005-05-16 23:17 ` Junio C Hamano
2005-05-16 22:22 ` Summary of core GIT while you are away Petr Baudis
2005-05-26 0:44 ` Kay Sievers
2005-05-26 1:13 ` Junio C Hamano
2005-05-26 1:53 ` Linus Torvalds
2005-05-26 1:45 ` Linus Torvalds [this message]
2005-05-26 20:27 ` Kay Sievers
2005-05-26 20:51 ` Junio C Hamano
2005-05-26 23:29 ` Kay Sievers
2005-05-26 23:59 ` Junio C Hamano
2005-05-27 1:50 ` H. Peter Anvin
2005-05-27 3:36 ` Junio C Hamano
2005-05-27 4:01 ` H. Peter Anvin
2005-05-27 4:12 ` Junio C Hamano
2005-05-27 4:13 ` H. Peter Anvin
2005-05-27 4:31 ` Junio C Hamano
2005-05-27 5:21 ` Linus Torvalds
2005-05-26 22:11 ` H. Peter Anvin
2005-05-26 22:25 ` Junio C Hamano
2005-05-26 23:59 ` Kay Sievers
2005-05-27 0:16 ` Junio C Hamano
2005-05-27 0:22 ` Kay Sievers
2005-05-27 0:40 ` 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=Pine.LNX.4.58.0505251826460.2307@ppc970.osdl.org \
--to=torvalds@osdl.org \
--cc=braddr@puremagic.com \
--cc=david@dgreaves.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=kay.sievers@vrfy.org \
--cc=nico@cam.org \
--cc=pasky@ucw.cz \
/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).