From 1aaba802a47141f404ea6b1d00a51990a2546f40 Mon Sep 17 00:00:00 2001 From: Ahmad Bamieh Date: Wed, 23 Aug 2017 18:52:19 +0300 Subject: [PATCH] add git branch support to the configs Add git branch support to the configs, defaults to master. config.yml: ```yml git: branch: ``` --- server/libs/git.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/libs/git.js b/server/libs/git.js index 2f86fbb2..d2dba3b9 100644 --- a/server/libs/git.js +++ b/server/libs/git.js @@ -48,15 +48,18 @@ module.exports = { } else { self._repo.path = appconfig.paths.repo } + // -> Initialize repository self.onReady = self._initRepo(appconfig) - // Define signature if (appconfig.git) { - self._signature.email = appconfig.git.serverEmail || 'wiki@example.com' + // Set repo branch + self._repo.branch = appconfig.git.branch || 'master'; + // Define signature + self._signature.email = appconfig.git.serverEmail || 'wiki@example.com'; } return self