Skip to content
Snippets Groups Projects
Commit 6f91211d authored by Richard Hartmann's avatar Richard Hartmann
Browse files

Make `vcsh clone` handle empty remotes gracefully

parent 8260b8ec
No related branches found
No related tags found
No related merge requests found
* vcsh clone fails when remote is empty
# Related #
* Package for Debian
......
......@@ -64,6 +64,10 @@ clone() {
git remote add origin "$GIT_REMOTE"
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
if [ -z $(git ls-remote 2> /dev/null) ]; then
info "remote is empty, not merging anything"
exit
fi
git fetch
for object in $(git ls-tree -r origin/master | awk '{print $4}'); do
[ -e "$object" ] &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment