From: "Shawn O. Pearce" <spearce@spearce.org>
To: Sam Elliott <sam@lenary.co.uk>
Cc: git@vger.kernel.org
Subject: Re: New Proposal (simple) for Metadata in Git Commits: git-meta
Date: Tue, 15 Dec 2009 14:05:29 -0800 [thread overview]
Message-ID: <20091215220529.GD18319@spearce.org> (raw)
In-Reply-To: <93857A5A-744E-4A7C-B42D-23A56A48AAF7@lenary.co.uk>
Sam Elliott <sam@lenary.co.uk> wrote:
> I had this idea a day or so again, and have written a simple
> implementation to storing some semi-structured data in a git commit
> message. This means that it's much easier for data to be found and
> scraped from a certain commit, for instance what issue numbers commits
> refer to or close.
So from your web page, this is basically just YAML shoved into the
footer of the message:
--8<--
Written half of the functionality. Namely the querying half.
---git-meta---
awesome: true
Github:
user: lenary
---git-meta---
-->8--
Why do we need the --git-meta-- delimiter lines?
JGit and Gerrit Code Review have already been following Git tradition
by using footer messages as metadata. E.g. we have lines like:
--8<--
init: Don't abort on empty directory
The following sequence should work:
mkdir testgit
java -jar gerrit.war init -d testgit
Since testgit is empty, it should be acceptable for us to populate the
directory with our files.
Bug: issue 358
Change-Id: Ia85f31802066f8d39b042d3d057d33950a5035fd
Signed-off-by: Shawn O. Pearce <sop@google.com>
-->8--
The JGit commit message parser has special logic to handle lines
that smell like one of these tag lines. So long as there is no
blank line in the footer paragraph, each of these tags can be read
and processed. Continuation lines should start with whitespace.
I don't remember my YAML well enough, but isn't this existing
standard still parseable by a YAML processor?
If you dropped the --git-meta-- tags above, JGit would happily
recognize the awesome: and Github: tags, but it might need a bit
more work to recognize the nested user: tag. Also, you'd be able
to use git-meta on the git and Linux kernel repositories to pull
out and work with Signed-off-by, Acked-by, etc.
--
Shawn.
next prev parent reply other threads:[~2009-12-15 22:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 21:27 New Proposal (simple) for Metadata in Git Commits: git-meta Sam Elliott
2009-12-15 22:05 ` Shawn O. Pearce [this message]
[not found] ` <7349A827-41D5-434F-85FE-D49980A7D501@lenary.co.uk>
2009-12-16 16:30 ` Shawn O. Pearce
2009-12-17 0:26 ` Johan Herland
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=20091215220529.GD18319@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=sam@lenary.co.uk \
/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