Browse Source

add git branch support to the configs

Add git branch support to the configs, defaults to master.

config.yml:
```yml
git:
  branch: <branch-name>
```
Ahmad Bamieh 7 years ago
parent
commit
1aaba802a4
1 changed files with 5 additions and 2 deletions
  1. 5 2
      server/libs/git.js

+ 5 - 2
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