3 # Copyright (c) 2006 Yann Dirson
6 test_description
='Check cloning in a repo subdir
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.
12 This test must be run before any tests making use of clone.
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
20 # Need a repo to clone
24 'stg clone right inside a git tree' \
27 # now work in a subdir
33 'stg clone deeper under a git tree' \
37 'Too many arguments' '
38 command_error stg clone foo bar2 bar3 2>err &&
39 grep -e "incorrect number of arguments" err
43 'Attempt clone to existing destination' '
44 command_error stg clone foo bar 2>err &&
45 grep -e "\"bar\" exists. Remove it first" err