Optimize fetch-git.

This commit is contained in:
Nicolas Pierron
2012-04-14 18:17:35 -07:00
parent ccc5d38976
commit 19d9955e89
11 changed files with 139 additions and 58 deletions

View File

@ -0,0 +1 @@
#! /bin/sh

1
tests/jobs/bzr-update.sh Executable file
View File

@ -0,0 +1 @@
#! /bin/sh

26
tests/jobs/git-update.sh Executable file
View File

@ -0,0 +1,26 @@
#! /bin/sh
cd "$1"
STATE_FILE=.state
if test -e $STATE_FILE; then
state=$(cat $STATE_FILE)
else
state=0;
fi
case $state in
(0)
echo "Add new file."
touch git-file-2
git add git-file-2 >&2
git commit -m "add git file 2" git-file-2 >&2
;;
(1)
echo "Rewrite commit."
echo 1 > git-file-2
git add git-file-2 >&2
git commit --amend -m "add git file 2" git-file-2 >&2
;;
esac
echo $(($state + 1)) > $STATE_FILE

1
tests/jobs/hg-update.sh Executable file
View File

@ -0,0 +1 @@
#! /bin/sh

View File

@ -0,0 +1 @@
#! /bin/sh

1
tests/jobs/svn-update.sh Executable file
View File

@ -0,0 +1 @@
#! /bin/sh