4 reponame="submodule-test-repo"
5 submodname="submodule-test-submodule"
7 begin_test "submodule local git dir"
11 setup_remote_repo "$reponame"
12 setup_remote_repo "$submodname"
14 clone_repo "$submodname" submod
16 echo "sub module" > dir/README
18 git commit -a -m "submodule readme"
19 git push origin master
21 clone_repo "$reponame" repo
22 git submodule add "$GITSERVER/$submodname" sub
24 git add .gitmodules sub
25 git commit -m "add submodule"
26 git push origin master
28 grep "sub module" sub/dir/README || {
29 echo "submodule not setup correctly?"
36 begin_test "submodule env"
40 # using the local clone from the above test
43 git lfs env | tee env.log
44 grep "Endpoint=$GITSERVER/$reponame.git/info/lfs (auth=none)$" env.log
45 grep "LocalWorkingDir=$(native_path_escaped "$TRASHDIR/repo$")" env.log
46 grep "LocalGitDir=$(native_path_escaped "$TRASHDIR/repo/.git$")" env.log
47 grep "LocalGitStorageDir=$(native_path_escaped "$TRASHDIR/repo/.git$")" env.log
48 grep "LocalMediaDir=$(native_path_escaped "$TRASHDIR/repo/.git/lfs/objects$")" env.log
49 grep "TempDir=$(native_path_escaped "$TRASHDIR/repo/.git/lfs/tmp$")" env.log
54 git lfs env | tee env.log
56 grep "Endpoint=$GITSERVER/$reponame.git/info/lfs (auth=none)$" env.log
57 grep "LocalWorkingDir=$" env.log
58 grep "LocalGitDir=$(native_path_escaped "$TRASHDIR/repo/.git$")" env.log
59 grep "LocalGitStorageDir=$(native_path_escaped "$TRASHDIR/repo/.git$")" env.log
60 grep "LocalMediaDir=$(native_path_escaped "$TRASHDIR/repo/.git/lfs/objects$")" env.log
61 grep "TempDir=$(native_path_escaped "$TRASHDIR/repo/.git/lfs/tmp$")" env.log
66 git lfs env | tee env.log
67 grep "Endpoint=$GITSERVER/$submodname.git/info/lfs (auth=none)$" env.log
68 grep "LocalWorkingDir=$(native_path_escaped "$TRASHDIR/repo/sub$")" env.log
69 grep "LocalGitDir=$(native_path_escaped "$TRASHDIR/repo/.git/modules/sub$")" env.log
70 grep "LocalGitStorageDir=$(native_path_escaped "$TRASHDIR/repo/.git/modules/sub$")" env.log
71 grep "LocalMediaDir=$(native_path_escaped "$TRASHDIR/repo/.git/modules/sub/lfs/objects$")" env.log
72 grep "TempDir=$(native_path_escaped "$TRASHDIR/repo/.git/modules/sub/lfs/tmp$")" env.log
77 git lfs env | tee env.log
78 grep "Endpoint=$GITSERVER/$submodname.git/info/lfs (auth=none)$" env.log
79 grep "LocalWorkingDir=$(native_path_escaped "$TRASHDIR/repo/sub$")" env.log
80 grep "LocalGitDir=$(native_path_escaped "$TRASHDIR/repo/.git/modules/sub$")" env.log
81 grep "LocalGitStorageDir=$(native_path_escaped "$TRASHDIR/repo/.git/modules/sub$")" env.log
82 grep "LocalMediaDir=$(native_path_escaped "$TRASHDIR/repo/.git/modules/sub/lfs/objects$")" env.log
83 grep "TempDir=$(native_path_escaped "$TRASHDIR/repo/.git/modules/sub/lfs/tmp$")" env.log