summaryrefslogtreecommitdiff
path: root/jtlib/git.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-06-10 17:25:04 +0300
committerLars Wirzenius <liw@liw.fi>2016-06-10 17:25:04 +0300
commit4c64ac3a01a7c47de62761437749e824130f522e (patch)
tree586a6a17fc36e56d76179f33cdcf4579cbd946d4 /jtlib/git.py
parent813af39a0b55219497457f4f98c635ada2643597 (diff)
downloadjt-4c64ac3a01a7c47de62761437749e824130f522e.tar.gz
Run git rebase --pull before git push
Diffstat (limited to 'jtlib/git.py')
-rw-r--r--jtlib/git.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/jtlib/git.py b/jtlib/git.py
index 439b502..e5c43a0 100644
--- a/jtlib/git.py
+++ b/jtlib/git.py
@@ -22,5 +22,9 @@ def commit_to_git(source_dir, pathnames):
cliapp.runcmd(['git', 'commit', '-m', 'Publish log entry'], cwd=source_dir)
+def pull_rebase_git(source_dir):
+ cliapp.runcmd(['git', 'pull', '--rebase'], cwd=source_dir)
+
+
def push_git(source_dir):
cliapp.runcmd(['git', 'push', 'origin', 'HEAD'], cwd=source_dir)