From: "Ping Yin" <pkufranky@gmail.com>
To: "Toby Allsopp" <Toby.Allsopp@navman.co.nz>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: git and peer review
Date: Mon, 5 May 2008 08:52:38 +0800 [thread overview]
Message-ID: <46dff0320805041752t1190534dy3740c88f5380098f@mail.gmail.com> (raw)
In-Reply-To: <87k5i9u8f1.fsf@nav-akl-pcn-343.mitacad.com>
On Mon, May 5, 2008 at 4:21 AM, Toby Allsopp <Toby.Allsopp@navman.co.nz> wrote:
> On Sat, May 03 2008, Ping Yin wrote:
>
> > Case 1
> > I ask someone to review my patches at my machine. If the review
> > passes, i have to add Reviewed-by line to each commit and then merge
> > it to the master branch. However, i find no easy way to add
> > reviewed-by line. Maybe adding --reviewed-by option to cherry-pick or
> > rebase or merge?
> >
> > Case 2
> > The reviewer is the maintainer, so i ask him to pull and review. So
> > now it is his turn to add review-by line. But still, how?
>
> I do something similar using git filter-branch --msg-filter. I have a
> little shell script call git-add-checked (our convention is to have a
> "checked: " line in the commit message):
>
> --8<---------------cut here---------------start------------->8---
> #!/bin/sh
>
> usage() {
> cat <<EOF
> Usage: git-add-checked <checker> [<filter-branch options>] <rev-list options>
> EOF
> }
>
> checker="$1"
> [ -n "$checker" ] || { usage >&2; exit 2; }
> shift
>
> set -x
> git filter-branch --msg-filter "sed '\$a\\
> \\
> checked: $checker'" "$@"
> --8<---------------cut here---------------end--------------->8---
>
> Then, after getting my changes reviewed, I just do:
>
> $ git-add-checked joe.bloggs trunk..
>
> This adds a "checked: joe.bloggs" line at the end of the commit message
> for all of the commits on the current branch since trunk (which is a
> remote branch maintained by git-svn).
>
Great, very useful for me. THX.
--
Ping Yin
next prev parent reply other threads:[~2008-05-05 0:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-03 1:02 git and peer review Ping Yin
2008-05-03 13:54 ` Thomas Adam
2008-05-03 14:03 ` Ping Yin
2008-05-03 14:22 ` Frodo Baggins
2008-05-03 14:27 ` Ping Yin
2008-05-04 20:21 ` Toby Allsopp
2008-05-05 0:52 ` Ping Yin [this message]
2008-05-05 13:48 ` Karl Hasselström
2008-05-17 21:30 ` Seth Falcon
2008-05-19 3:37 ` Shawn O. Pearce
2008-05-19 14:10 ` Seth Falcon
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=46dff0320805041752t1190534dy3740c88f5380098f@mail.gmail.com \
--to=pkufranky@gmail.com \
--cc=Toby.Allsopp@navman.co.nz \
--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 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).