From: Richard Hartmann Date: Sat, 26 Mar 2016 20:24:35 +0000 (-0700) Subject: Merge pull request #198 from ohspite/fix-git-version-parsing X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/0fe34b8291512c893731cad6382e363e764d59f7?hp=8ae70a31cd3553ea94502b9784ba4dc5bee274c4 Merge pull request #198 from ohspite/fix-git-version-parsing Fix git version parsing when there are spaces --- diff --git a/vcsh b/vcsh index f9bea25..de1b419 100755 --- a/vcsh +++ b/vcsh @@ -476,7 +476,7 @@ write_gitignore() { use cd "$VCSH_BASE" || fatal "could not enter '$VCSH_BASE'" 11 - local GIT_VERSION=$(git --version) + local GIT_VERSION="$(git --version)" local GIT_VERSION_MAJOR=$(echo $GIT_VERSION | sed -n 's/.* \([0-9]\)\..*/\1/p') local GIT_VERSION_MINOR=$(echo $GIT_VERSION | sed -n 's/.* \([0-9]\)\.\([0-9]\)\..*/\2/p') OLDIFS=$IFS