Re: Adding Reviewed-by/Tested-by tags to other peoples commits
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 11, 2008, 10:58 UTC
- Message-ID
- <alpine.DEB.1.00.0810111254240.22125@pacific.mpi-cbg.de.mpi-cbg.de>
- In-Reply-To
- <20081011074604.GA23883@sigill.intra.peff.net>
Hi,
On Sat, 11 Oct 2008, Jeff King wrote:
Show 12 quoted lines
> On Sat, Oct 11, 2008 at 07:37:04AM +0100, Alex Bennee wrote: > > > I've just tested/reviewed a patch of someone elses and I want to > > forward it on the appropriate mailing list. I gather for Linux you > > just add the appropriate tags to the commit. Does git offer a shortcut > > for doing this or do you have to do a reset HEAD^ and re-commit with a > > copy&pasted and modified commit message? > > Try "git commit --amend" to edit the commit message. There's no > automatic way of adding acked-by or tested-by tags with git; most people > who do those things often would probably configure their editor to make > it easier.
Of course, you could also automate it with a script:
-- snip -- GIT_EDITOR='sh -c "perl -pi.bak -e s/pick/edit/ \"$1\""' \ git rebase -i HEAD~2 while test -d .git/rebase-merge do GIT_EDITOR='sh -c "echo \"Reviewed-by: Mini Me <mi@ni.me>\" >> \"$1\""' \ git commit --amend && git rebase --continue || break done -- snap --
(Of course you would make HEAD~2 a parameter...)
BTW what happened with the "amend" patches to rebase -i? AFAIR Peff or MadCoder (or was it j6t?) had patches to teach rebase -i the "amend" command, which would not fall back to the command line just to fix a typo in a commit message... I would like to have that.
Hth, Dscho