diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-10-31 15:03:56 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-10-31 15:06:34 +0000 |
commit | 2ed58be87924acc4aec81407ba93641afe776b35 (patch) | |
tree | 99bb883c6d55c17d98c8cc1f5a0bfd55d94381f0 /g | |
parent | d5486145c510de842a17f906fd8a7119d30d9993 (diff) |
make --last-working checkout the last working version
thanks to Bjoern and Christian for tips.
Diffstat (limited to 'g')
-rwxr-xr-x | g | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -242,7 +242,13 @@ for REPO in $DIRS ; do elif [ -d "$DIR" -a "z$LAST_WORKING" != "z" ]; then echo "fetching notes for $REPO ..." (cd $DIR && git fetch origin 'refs/notes/*:refs/notes/*') - # FIXME: we need to grep the git log for a known good note name... + hash=`(cd $DIR && git log --pretty='%H %N' | grep 'win32 working build' | head -n1 | sed 's/ win32.*//')` + if test "z$hash" != "z"; then + echo "update to $hash" + (cd $DIR && git checkout $hash) + else + echo "Warning: missing known working note on repo $REPO" + fi elif [ -d "$DIR" -a "z$SET_LAST_WORKING" != "z" ]; then echo "fetching notes for $REPO ..." (cd $DIR && git fetch origin 'refs/notes/*:refs/notes/*') |