Merge branch 'jk/maint-pull-dry-run-noop' into maint
[git/jnareb-git/bp-gitweb.git] / t / t2105-update-index-gitfile.sh
blob641607d89ae400f5fbce9dba0f42ee185d3ecd6a
1 #!/bin/sh
3 # Copyright (c) 2010 Brad King
6 test_description='git update-index for gitlink to .git file.
9 . ./test-lib.sh
11 test_expect_success 'submodule with absolute .git file' '
12 mkdir sub1 &&
13 (cd sub1 &&
14 git init &&
15 REAL="$(pwd)/.real" &&
16 mv .git "$REAL"
17 echo "gitdir: $REAL" >.git &&
18 test_commit first)
21 test_expect_success 'add gitlink to absolute .git file' '
22 git update-index --add -- sub1
25 test_expect_success 'submodule with relative .git file' '
26 mkdir sub2 &&
27 (cd sub2 &&
28 git init &&
29 mv .git .real &&
30 echo "gitdir: .real" >.git &&
31 test_commit first)
34 test_expect_success 'add gitlink to relative .git file' '
35 git update-index --add -- sub2
38 test_done