I already saw scripts/git-checkout.sh fails many times changing repo
and/or tag for my tests, for example today:
GIT=git
/mnt/vm/source/xen/Xen/tools/firmware/../../scripts/git-checkout.sh
git://xenbits.xen.org/osstest/ovmf.git xen-tested-master ovmf-dir
Cloning into 'ovmf-dir-remote.tmp'...
remote: Counting objects: 203149, done.
remote: Compressing objects: 100% (49944/49944), done.
remote: Total 203149 (delta 153028), reused 196420 (delta 146807)
Ricezione degli oggetti: 100% (203149/203149), 194.95 MiB | 527.00
KiB/s, done.
Risoluzione dei delta: 100% (153028/153028), done.
Checking connectivity... fatto.
warning: l'HEAD remoto si riferisce ad un ref inesistente, impossibile
eseguire il checkout.
fatal: Cannot update paths and switch to branch 'dummy' at the same time.
Did you intend to checkout 'xen-tested-master' which can not be
resolved as commit?
Makefile:23: set di istruzioni per l'obiettivo "ovmf-dir" non riuscito
make[3]: *** [ovmf-dir] Errore 128
I not understand why use a dummy branch even if directory is a "temp."
I tried a very fast change and worked:
#!/bin/sh
if test $# -lt 3; then
echo "Usage: $0 <tree> <tag> <dir>"
exit 1
fi
TREE=$1
TAG=$2
DIR=$3
set -e
if test \! -d $DIR-remote; then
rm -rf $DIR-remote $DIR-remote.tmp
mkdir -p $DIR-remote.tmp; rmdir $DIR-remote.tmp
if test "$TAG" ; then
$GIT clone -b $TAG $TREE $DIR-remote.tmp
else
$GIT clone $TREE $DIR-remote.tmp
fi
mv $DIR-remote.tmp $DIR-remote
fi
rm -f $DIR
ln -sf $DIR-remote $DIR
But probably a better improvement/solution is needed for a good script
working with any branch (its head) or tag.
Thanks for any reply and sorry for my bad english.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel