Add git-pack-intersect
[git/git-svn.git] / t / t5501-old-fetch-and-upload.sh
blobada5130328d83b2c6014fdc6f78946cbb4a525bd
1 #!/bin/sh
3 # Copyright (c) 2005 Johannes Schindelin
6 # Test that the current fetch-pack/upload-pack plays nicely with
7 # an old counterpart
9 cd $(dirname $0) || exit 1
11 tmp=$(mktemp /tmp/tmp-XXXXXXXX)
13 retval=0
15 if [ -z "$1" ]; then
16 list="fetch upload"
17 else
18 list="$@"
21 for i in $list; do
22 case "$i" in
23 fetch) pgm="old-git-fetch-pack"; replace="$pgm";;
24 upload) pgm="old-git-upload-pack"; replace="git-fetch-pack --exec=$pgm";;
25 both) pgm="old-git-upload-pack"; replace="old-git-fetch-pack --exec=$pgm";;
26 esac
28 if which $pgm 2>/dev/null; then
29 echo "Testing with $pgm"
30 sed -e "s/git-fetch-pack/$replace/g" \
31 -e "s/# old fails/warn/" < t5500-fetch-pack.sh > $tmp
33 sh $tmp || retval=$?
34 rm $tmp
36 test $retval != 0 && exit $retval
37 else
38 echo "Skipping test for $i, since I cannot find $pgm"
40 done
42 exit 0