Move identification of parent branch's remote def up into stack class.
[stgit] / t / t1100-clone-under.sh
CommitLineData
608961c2
YD
1#!/bin/sh
2#
3# Copyright (c) 2006 Yann Dirson
4#
5
6test_description='Check cloning in a repo subdir
7
8Check that "stg clone" works in a subdir of a git tree.
9This ensures (to some point) that a clone within a tree does
10not corrupt the enclosing repo.
11
12This 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
21test_create_repo foo
22
23test_expect_success \
24 'stg clone right inside a git tree' \
25 "stg clone foo bar"
26
27# now work in a subdir
28mkdir sub
29mv foo sub
30cd sub
31
32test_expect_success \
33 'stg clone deeper under a git tree' \
34 "stg clone foo bar"
35
36test_done