summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-06-16 19:33:44 +0300
committerLars Wirzenius <liw@liw.fi>2019-06-16 19:33:44 +0300
commit220f34d4c5fe3e0a96b78f43d7a5eaebfbff3a00 (patch)
tree88790a2630fe99a253868feea3e0665ed76190e1
parent3e3afc88242d7fdbdeca1810427cb7856bd3ed77 (diff)
downloadjt-220f34d4c5fe3e0a96b78f43d7a5eaebfbff3a00.tar.gz
Fix: don't use git for new topics, if --no-gitHEADmaster
-rw-r--r--jtlib/plugins/new_topic_plugin.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/jtlib/plugins/new_topic_plugin.py b/jtlib/plugins/new_topic_plugin.py
index 1114bb4..38b4e55 100644
--- a/jtlib/plugins/new_topic_plugin.py
+++ b/jtlib/plugins/new_topic_plugin.py
@@ -37,9 +37,10 @@ class NewTopicCommand(cliapp.Plugin):
pathname = self._topic_pathname(args[0])
self._create_topic_page(pathname, args[1])
- jtlib.commit_to_git(self.app.settings['source'], [pathname])
- if self.app.settings['push']:
- jtlib.push_git(self.app.settings['source'])
+ if self.app.settings['git']:
+ jtlib.commit_to_git(self.app.settings['source'], [pathname])
+ if self.app.settings['push']:
+ jtlib.push_git(self.app.settings['source'])
def _topic_pathname(self, page_path):
return os.path.join(self.app.settings['source'], page_path + '.mdwn')