summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-05-03 22:00:29 +0300
committerLars Wirzenius <liw@liw.fi>2015-05-03 22:00:29 +0300
commitae78bdcdbf23eebaa67bb359ef6a0ba2dda16a0a (patch)
tree489ebe7fddd09c2e49466ed50e5d0459c337a462
parent51e0784d32d6118d24888b4cb7798619077ece77 (diff)
downloadjt-ae78bdcdbf23eebaa67bb359ef6a0ba2dda16a0a.tar.gz
Commit new topic page
-rwxr-xr-xjt3
-rw-r--r--yarns/900-implementations.yarn5
2 files changed, 8 insertions, 0 deletions
diff --git a/jt b/jt
index 9fbe49d..34fdfd9 100755
--- a/jt
+++ b/jt
@@ -265,6 +265,9 @@ class NewTopicCommand(Command):
pathname = self._topic_pathname(args[0])
self._create_topic_page(pathname, args[1])
+ commit_to_git(self._app.settings['source'], [pathname])
+ if self._app.settings['push']:
+ push_git(self._app.settings['source'])
def _topic_pathname(self, page_path):
return os.path.join(self._app.settings['source'], page_path + '.mdwn')
diff --git a/yarns/900-implementations.yarn b/yarns/900-implementations.yarn
index 178fadd..528c879 100644
--- a/yarns/900-implementations.yarn
+++ b/yarns/900-implementations.yarn
@@ -28,6 +28,11 @@ For tests, we need an empty journal.
[config]
source = $DATADIR/$MATCH_1
EOF
+ cd "$DATADIR/$MATCH_1"
+ git init .
+ touch README
+ git add README
+ git commit -m initial
Keeping time