Messages in this thread | | | Subject | Re: Git-commits mailing list feed. | From | David Woodhouse <> | Date | Sun, 24 Apr 2005 00:21:22 +1000 |
| |
On Sat, 2005-04-23 at 14:58 +0200, Jan Dittmer wrote: > I didn't found above mentioned post, so I hacked up a cruel script > myself. It relies on ketchup (www.selenic.com/ketchup) > to retrieve the current base version. Also it requires git's > `checkout-cache --prefix=` to work properly.
Thanks... but it seems a little excessive. I was thinking of something much simpler; along the lines of...
#!/bin/sh
STAGE=/staging/dwmw2/git
cd /home/dwmw2/git/snapshot-2.6
git pull || exit 1
LASTRELEASE=`ls -rt .git/tags | grep -v git | grep -v MailDone | tail -1` LASTTAG=`ls -rt .git/tags | grep -v MailDone | tail -1`
CURCOMMIT=`commit-id` LASTCOMMIT=`cat .git/tags/$LASTTAG` RELCOMMIT=`cat .git/tags/$LASTRELEASE`
[ "$LASTCOMMIT" = "$CURCOMMIT" ] && exit 0
CURTREE=`tree-id $CURCOMMIT` #LASTTREE=`tree-id $LASTCOMMIT` RELTREE=`tree-id $RELCOMMIT`
if echo $LASTTAG | grep -q -- -git ; then OLDGITNUM=`echo $LASTTAG | sed s/^.*-git//` NEWGITNUM=`expr $OLDGITNUM + 1` NEWTAG=`echo $LASTTAG | sed s/-git$OLDGITNUM/-git$NEWGITNUM/` else NEWTAG=$LASTTAG-git1 fi
echo $commit-id > $STAGE/$NEWTAG.id # This is, unfortunately, in chronological order. Walking the tree would # be better. git log $CURCOMMIT ^$RELCOMMIT > $STAGE/$NEWTAG.log git diff -r $RELTREE -r $CURTREE | gzip -9 > $STAGE/patch-$NEWTAG.gz
echo $CURCOMMIT > .git/tags/$NEWTAG
-- dwmw2
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |