[oe] Git Migration Status

Tom Rini trini at kernel.crashing.org
Tue Jul 29 19:52:32 UTC 2008


On Tue, Jul 29, 2008 at 04:31:38PM -0300, Otavio Salvador wrote:
> Thomas Kunze <thommycheck at gmx.de> writes:
> 
> > Hi,
> >
> > just a minor question:
> > Can we have the sender for commit messages as it is in monotone?
> > e.g. "mickeyl commit" instead of  "OE GIT Trial"
> >
> > I find it very useful to be able to see who committed sth. with a
> > short look
> > into my mailbox.
> 
> You'll see the merge commit and the mail script could be changed to
> post the commiter id too I guess.

The following script is something I used to use years ago on the linux
kernel git commit lists and triggered from procmail:
#!/bin/sh

TMP=`mktemp /tmp/setfrom.XXXXXX`
cat > $TMP

## Old BitKeeper logic
from=`grep '^ChangeSet' $TMP | head -1 | awk '{print $NF}'`

## New git logic
author=`sed -n '/^author /p' < $TMP | head -n 1`
if [ ! -z "$author" ]; then
  from=`echo $author | sed 's/author \(.*>\).*/\1/'`
  date=`echo $author | sed 's/author.*> //'`
fi
if test -n "$from" -a -n "$date"; then
  formail -I "From: $from" -I "Date: `date -d "$date" -R`" < $TMP
else
  if test -n "$from"; then
    formail -I "From: $from" < $TMP
  else
    cat $TMP
  fi
fi

rm $TMP

-- 
Tom Rini




More information about the Openembedded-devel mailing list