Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
391dfa7d
Commit
391dfa7d
authored
Jan 22, 2017
by
Matthew Brett
Browse files
Do a full checkout instead of .git checkout
parent
ce65bc01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
common_utils.sh
common_utils.sh
+3
-3
tests/test_fill_submodule.sh
tests/test_fill_submodule.sh
+2
-0
No files found.
common_utils.sh
View file @
391dfa7d
...
...
@@ -256,8 +256,8 @@ function fill_submodule {
[
-
d
"
$git_loc
"
]
&&
return
# Need to recreate .git directory for submodule
local
origin_url
=
$(
cd
"
$repo_dir
"
&&
git config
--get
remote.origin.url
)
git clone
--
recursive
--
mirror
"
$repo_dir
"
"
$repo_dir
/.git-full
"
rm
"
$git_loc
"
mv
"
$repo_dir
/.git-full"
"
$git_loc
"
git clone
--
recursive
"
$repo_dir
"
"
$
{
repo_dir
}
-copy
"
rm
-
rf
"
$repo_dir
"
mv
"
$
{
repo_dir
}
-copy"
"
$repo_dir
"
(
cd
"
$repo_dir
"
&&
git remote set-url origin
$origin_url
)
}
tests/test_fill_submodule.sh
View file @
391dfa7d
...
...
@@ -27,6 +27,8 @@ cd project
[
"
$(
git log
--format
=
"%s"
)
"
==
"first project"
]
||
ingest
"bad after filling"
[
-d
.git
]
||
ingest
"expecting .git to be a directory"
[
"
$(
git config
--get
remote.origin.url
)
"
==
"
$remote_url
"
]
||
ingest
"bad remote"
# Check we can do a checkout
git checkout master
cd
..
# Intervene again (has .git directory now)
fill_submodule project
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment