Skip to content

Commit dcbbf65

Browse files
Add test for proxy with rev operators
1 parent be51ece commit dcbbf65

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

tests/proxy/clone_rev_operators.t

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
$ export GIT_TREE_FMT='%(objectmode) %(objecttype) %(objectname) %(path)'
2+
$ . ${TESTDIR}/setup_test_env.sh
3+
$ cd ${TESTTMP}
4+
5+
$ git clone -q http://localhost:8001/real_repo.git
6+
warning: You appear to have cloned an empty repository.
7+
8+
$ cd real_repo
9+
10+
$ echo contents1 > file
11+
$ git add file
12+
$ git commit -q -m "commit1"
13+
14+
$ echo contents2 > file
15+
$ git add file
16+
$ git commit -q -m "commit2"
17+
18+
$ echo contents3 > file
19+
$ git add file
20+
$ git commit -q -m "commit3"
21+
22+
$ echo contents4 > file
23+
$ git add file
24+
$ git commit -q -m "commit4"
25+
26+
$ git log --oneline --no-abbrev-commit
27+
c76092ddde20e1071d88491ae990b60b95b50d8a commit4
28+
53b7ffe9ba2366c6d317a97bd154f7507ce5e151 commit3
29+
27ee1d4576a83a7c50484b680ba68edbbc196662 commit2
30+
c4c0a059d8a45f4248f68115445a99e2a241aff8 commit1
31+
32+
$ git push -q
33+
$ git clone -q 'http://localhost:8002/real_repo.git:rev(%3C27ee1d4576a83a7c50484b680ba68edbbc196662:prefix=subdir).git' clone-test
34+
35+
$ git -C clone-test log --oneline
36+
111c99d commit4
37+
defc311 commit3
38+
5687af0 commit2
39+
3200ecb commit1
40+
41+
$ git -C clone-test ls-tree --format "${GIT_TREE_FMT}" 3200ecb
42+
040000 tree 51ca6cbff0e8a61e440831239e1a7750517a608a subdir
43+
44+
$ git -C clone-test ls-tree --format "${GIT_TREE_FMT}" 111c99d
45+
100644 blob 288746e9035732a1fe600ee331de94e70f9639cb file

0 commit comments

Comments
 (0)