diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-01-20 22:09:14 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-01-20 22:09:14 +0000 |
commit | 01473d28bb06a476421f2621dcca6389398843d8 (patch) | |
tree | e673780168d9d78480ac39165c00053bb9391775 | |
parent | 00d6c43ab1bf3f62e7230505135389916c9874e6 (diff) | |
download | jt-01473d28bb06a476421f2621dcca6389398843d8.tar.gz |
Make git push optional
-rwxr-xr-x | jt | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -69,6 +69,9 @@ class JournalTool(cliapp.Application): 'indicate where the filename goes', default='sensible-editor %s') + self.settings.boolean( + ['push'], + 'push finished articles with git?') def cmd_new(self, args): '''Create a new journal entry draft.''' @@ -224,9 +227,10 @@ class JournalTool(cliapp.Application): cliapp.runcmd( ['git', 'commit', '-m', 'Publish log entry'], cwd=self.settings['source']) - cliapp.runcmd( - ['git', 'push', 'origin', 'HEAD'], - cwd=self.settings['source']) + if self.settings['push']: + cliapp.runcmd( + ['git', 'push', 'origin', 'HEAD'], + cwd=self.settings['source']) def cmd_new_person(self, args): '''Create a page to list all notes referring to a person. |