]> git.ipfire.org Git - thirdparty/git.git/blob - t/t5501-old-fetch-and-upload.sh
t3100: add ls-tree -t and -d tests.
[thirdparty/git.git] / t / t5501-old-fetch-and-upload.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2005 Johannes Schindelin
4 #
5
6 # Test that the current fetch-pack/upload-pack plays nicely with
7 # an old counterpart
8
9 cd $(dirname $0) || exit 1
10
11 tmp=$(mktemp /tmp/tmp-XXXXXXXX)
12
13 retval=0
14
15 if [ -z "$1" ]; then
16 list="fetch upload"
17 else
18 list="$@"
19 fi
20
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
27
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
32
33 sh $tmp || retval=$?
34 rm $tmp
35
36 test $retval != 0 && exit $retval
37 else
38 echo "Skipping test for $i, since I cannot find $pgm"
39 fi
40 done
41
42 exit 0
43