diff --git a/REQUIRE b/REQUIRE index 11544a6..b911114 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,4 +1,5 @@ julia 0.6 Compat 0.47.0 BinDeps +VersionParsing @osx Homebrew diff --git a/src/Git.jl b/src/Git.jl index 0f36e3c..67d0249 100644 --- a/src/Git.jl +++ b/src/Git.jl @@ -6,6 +6,7 @@ module Git # using Compat using Base: shell_escape +using VersionParsing export gitcmd # determined by deps/build.jl and saved in deps/deps.jl depsjl = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl") @@ -88,15 +89,7 @@ end Return the version of Git being used by the package. """ -function version() - vs = split(readchomp(`version`), ' ')[3] - ns = split(vs, '.') - if length(ns) > 3 - VersionNumber(join(ns[1:3], '.')) - else - VersionNumber(join(ns, '.')) - end -end +version() = vparse(readchomp(`version`)) """ Git.modules(args; dir="")