summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2010-08-10 13:35:08 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2010-08-13 13:47:13 +0200
commitaf5004cb3235eb2130f3800b13ebad73e3d4d1ba (patch)
tree2b66262e34acff54b7636ec6f10cb41c6b704360
parent279d7c33511b971962c340cdb867feebdc77950e (diff)
downloadfedora-packager-enh/set-push.default-tracking-on-clone.zip
fedora-packager-enh/set-push.default-tracking-on-clone.tar.gz
fedora-packager-enh/set-push.default-tracking-on-clone.tar.xz
clone: set repo's push.default to trackingenh/set-push.default-tracking-on-clone
-rw-r--r--src/pyfedpkg/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 19d1c5c..94a721e 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -367,6 +367,10 @@ def clone(module, user, path=None, branch=None, bare_dir=None):
log.debug('Cloning %s' % giturl)
cmd.extend([giturl])
_run_command(cmd)
+
+ # Set push.default to "tracking"
+ repo = git.Repo(module)
+ repo.git.config('--add', 'push.default', 'tracking')
return
def clone_with_dirs(module, user, path=None):