From 49d41da15287922a4ddc01c44551f8a123554434 Mon Sep 17 00:00:00 2001 From: Stephen Fromm Date: Wed, 7 Nov 2012 12:15:22 -0800 Subject: [PATCH] Use supplied remote name when cloning git repository --- library/git | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/git b/library/git index dbc0cf5857..1962f0e5ec 100755 --- a/library/git +++ b/library/git @@ -77,13 +77,13 @@ def get_version(dest): sha = sha[0].split()[1] return sha -def clone(repo, dest): +def clone(repo, dest, remote): ''' makes a new git repo if it does not already exist ''' try: os.makedirs(os.path.dirname(dest)) except: pass - return _run("git clone %s %s" % (repo, dest)) + return _run("git clone -o %s %s %s" % (remote, repo, dest)) def has_local_mods(dest): os.chdir(dest) @@ -217,7 +217,7 @@ def main(): before = None local_mods = False if not os.path.exists(gitconfig): - (rc, out, err) = clone(repo, dest) + (rc, out, err) = clone(repo, dest, remote) if rc != 0: module.fail_json(msg=err) else: