summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-01-20 22:09:14 +0000
committerLars Wirzenius <liw@liw.fi>2014-01-20 22:09:14 +0000
commit01473d28bb06a476421f2621dcca6389398843d8 (patch)
treee673780168d9d78480ac39165c00053bb9391775
parent00d6c43ab1bf3f62e7230505135389916c9874e6 (diff)
downloadjt-01473d28bb06a476421f2621dcca6389398843d8.tar.gz
Make git push optional
-rwxr-xr-xjt10
1 files changed, 7 insertions, 3 deletions
diff --git a/jt b/jt
index a74da54..60db3c3 100755
--- a/jt
+++ b/jt
@@ -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.