Commit 391dfa7d authored by Matthew Brett's avatar Matthew Brett
Browse files

Do a full checkout instead of .git checkout

parent ce65bc01
...@@ -256,8 +256,8 @@ function fill_submodule { ...@@ -256,8 +256,8 @@ function fill_submodule {
[ -d "$git_loc" ] && return [ -d "$git_loc" ] && return
# Need to recreate .git directory for submodule # Need to recreate .git directory for submodule
local origin_url=$(cd "$repo_dir" && git config --get remote.origin.url) local origin_url=$(cd "$repo_dir" && git config --get remote.origin.url)
git clone --recursive --mirror "$repo_dir" "$repo_dir/.git-full" git clone --recursive "$repo_dir" "${repo_dir}-copy"
rm "$git_loc" rm -rf "$repo_dir"
mv "$repo_dir/.git-full" "$git_loc" mv "${repo_dir}-copy" "$repo_dir"
(cd "$repo_dir" && git remote set-url origin $origin_url) (cd "$repo_dir" && git remote set-url origin $origin_url)
} }
...@@ -27,6 +27,8 @@ cd project ...@@ -27,6 +27,8 @@ cd project
[ "$(git log --format="%s")" == "first project" ] || ingest "bad after filling" [ "$(git log --format="%s")" == "first project" ] || ingest "bad after filling"
[ -d .git ] || ingest "expecting .git to be a directory" [ -d .git ] || ingest "expecting .git to be a directory"
[ "$(git config --get remote.origin.url)" == "$remote_url" ] || ingest "bad remote" [ "$(git config --get remote.origin.url)" == "$remote_url" ] || ingest "bad remote"
# Check we can do a checkout
git checkout master
cd .. cd ..
# Intervene again (has .git directory now) # Intervene again (has .git directory now)
fill_submodule project fill_submodule project
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment