Git 2.47-rc1
[git.git] / t / interop / i5500-git-daemon.sh
blob88712d1b5dbd6da2c0c5496ba1d70ee65a4a6760
1 #!/bin/sh
3 VERSION_A=.
4 VERSION_B=v1.0.0
5 MAKE_OPTS_B="NO_OPENSSL=TooOld"
7 : ${LIB_GIT_DAEMON_PORT:=5500}
8 LIB_GIT_DAEMON_COMMAND='git.a daemon'
10 test_description='clone and fetch by older client'
11 . ./interop-lib.sh
12 . "$TEST_DIRECTORY"/lib-git-daemon.sh
14 start_git_daemon --export-all
16 repo=$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo
18 test_expect_success "create repo served by $VERSION_A" '
19 git.a init "$repo" &&
20 git.a -C "$repo" commit --allow-empty -m one
23 test_expect_success "clone with $VERSION_B" '
24 git.b clone "$GIT_DAEMON_URL/repo" child &&
25 echo one >expect &&
26 git.a -C child log -1 --format=%s >actual &&
27 test_cmp expect actual
30 test_expect_success "fetch with $VERSION_B" '
31 git.a -C "$repo" commit --allow-empty -m two &&
33 cd child &&
34 git.b fetch
35 ) &&
36 echo two >expect &&
37 git.a -C child log -1 --format=%s FETCH_HEAD >actual &&
38 test_cmp expect actual
41 test_done