Re: Adding Reviewed-by/Tested-by tags to other peoples commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, 11 Oct 2008, Jeff King wrote:

> 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@xxxxx>\" >> \"$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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux