Move identification of parent branch's remote def up into stack class.
[stgit] / t / t1100-clone-under.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2006 Yann Dirson
4 #
5
6 test_description='Check cloning in a repo subdir
7
8 Check that "stg clone" works in a subdir of a git tree.
9 This ensures (to some point) that a clone within a tree does
10 not corrupt the enclosing repo.
11
12 This test must be run before any tests making use of clone.
13 '
14
15 . ./test-lib.sh
16
17 # Here we are in a repo, we have a ./.git
18 # Do not get rid of it, or a bug may bite out stgit repo hard
19
20 # Need a repo to clone
21 test_create_repo foo
22
23 test_expect_success \
24 'stg clone right inside a git tree' \
25 "stg clone foo bar"
26
27 # now work in a subdir
28 mkdir sub
29 mv foo sub
30 cd sub
31
32 test_expect_success \
33 'stg clone deeper under a git tree' \
34 "stg clone foo bar"
35
36 test_done