summaryrefslogtreecommitdiffstats
path: root/src/pyfedpkg
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyfedpkg')
-rw-r--r--src/pyfedpkg/__init__.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 9e15057..bb7449f 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -676,18 +676,22 @@ def new(path=None):
log.debug('Diffing from tag %s' % tag)
return repo.git.diff('-M', tag)
-def pull():
- """Pull changes from the main repository"""
+def pull(path=None):
+ """Pull changes from the main repository using optional path"""
+ if not path:
+ path = os.getcwd()
cmd = ['git', 'pull']
- _run_command(cmd)
+ _run_command(cmd, cwd=path)
return
-def push():
- """Push changes to the main repository"""
+def push(path=None):
+ """Push changes to the main repository using optional path"""
+ if not path:
+ path = os.getcwd()
cmd = ['git', 'push']
- _run_command(cmd)
+ _run_command(cmd, cwd=path)
return
def sources(path, outdir=None):