From: Richard Hartmann Date: Wed, 7 Dec 2011 22:54:38 +0000 (+0100) Subject: Make `vcsh clone` work with older git versions X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/80fb228314fd57923f18eda30ed52148a98400fd?hp=-c Make `vcsh clone` work with older git versions 1.7.7 is happy without parameters, 1.7.0.8 needs origin master --- 80fb228314fd57923f18eda30ed52148a98400fd diff --git a/vcsh b/vcsh index 4979d71..990a234 100755 --- a/vcsh +++ b/vcsh @@ -64,7 +64,7 @@ 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 + if [ $(git ls-remote origin master 2> /dev/null | wc -l ) -lt 1 ]; then info "remote is empty, not merging anything" exit fi