From 220f34d4c5fe3e0a96b78f43d7a5eaebfbff3a00 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 16 Jun 2019 19:33:44 +0300 Subject: Fix: don't use git for new topics, if --no-git --- jtlib/plugins/new_topic_plugin.py | 7 ++++--- 1 file 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') -- cgit v1.2.1