Skip to content
Snippets Groups Projects
Commit 2f3c29eb authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Scripts, as initially posted to git@vger.kernel.org.

parents
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
set -e
cd test-git/committer
i=0
while :
do
echo $i > foo
git add foo
git commit -m"Updated foo"
git push
i=`expr $i + 1`
done
#!/bin/sh
cd test-git/mirror.git
while :
do
echo running fetch...
git fetch || exit 1
echo done.
done
#!/bin/sh
what=$1
case "$what" in
master);;
mirror);;
*) echo need to specify master or mirror >&2
exit 1;;
esac
good=0
cd test-git || exit 1
rm -rf $what-clone
while :
do
git clone $what.git $what-clone >$what.out 2>$what.err || exit 1
if [ -s $what.err ]
then
echo unexpected stderr from git clone:
cat $what.err
exit 1
fi
if [ "`cat $what.out`" != "Cloning into '$what-clone'...
done." ]
then
echo unexpected stdout from git clone:
cat $what.out
exit 1
fi
if ! [ -f $what-clone/foo ]
then
echo failed to create $what-clone/foo
exit 1
fi
rm -rf $what-clone
good=`expr $good + 1`
echo "$good good clones"
done
#!/bin/sh
mkdir test-git || exit 1
cd test-git
mkdir master.git
(cd master.git && git init --bare)
git clone master.git committer
(cd committer &&
touch foo &&
git add foo &&
git commit -m"Initial commit" &&
git push origin master)
git clone --mirror master.git mirror.git
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment