Don't configure Git unless we have to

This commit is contained in:
Chris de Graaf 2019-01-15 10:36:30 -06:00
parent ac2ec4db0a
commit a7a9990cac

View File

@ -18,9 +18,10 @@ pkg> add PkgTemplates
## Usage
```@setup usage
run(`git config --global user.name "Travis"`)
run(`git config --global user.email "travis@c.i"`)
run(`git config --global github.user "travis"`)
using LibGit2: getconfig
isempty(getconfig("user.name", "")) && run(`git config --global user.name "Travis"`)
isempty(getconfig("user.email", "")) && run(`git config --global user.email "travis@c.i"`)
isempty(getconfig("github.user", "")) && run(`git config --global github.user "travis"`)
using Pkg
Pkg.activate(mktempdir())
# This code gets run in docs/build/, so this path evaluates to the repo root.