interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / interop / i5500-git-daemon.sh

41 lines · 886 bytes Raw Blame History
1#!/bin/sh
2
3VERSION_A=.
4VERSION_B=v1.0.0
5MAKE_OPTS_B="NO_OPENSSL=TooOld"
6
7: ${LIB_GIT_DAEMON_PORT:=5500}
8LIB_GIT_DAEMON_COMMAND='git.a daemon'
9
10test_description='clone and fetch by older client'
11. ./interop-lib.sh
12. "$TEST_DIRECTORY"/lib-git-daemon.sh
13
14start_git_daemon --export-all
15
16repo=$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo
17
18test_expect_success "create repo served by $VERSION_A" '
19 git.a init "$repo" &&
20 git.a -C "$repo" commit --allow-empty -m one
21'
22
23test_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
28'
29
30test_expect_success "fetch with $VERSION_B" '
31 git.a -C "$repo" commit --allow-empty -m two &&
32 (
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
39'
40
41test_done