From 0f9cb7a24f709d2c2dea20eeddd01b5be99100fa Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Wed, 12 Mar 2014 13:28:39 -0400 Subject: [PATCH] git: Execute git commands in `dest` directory --- source_control/git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source_control/git b/source_control/git index 4f885c94001..65c799a5df4 100644 --- a/source_control/git +++ b/source_control/git @@ -263,7 +263,7 @@ def get_remote_head(git_path, module, dest, version, remote, bare): def is_remote_tag(git_path, module, dest, remote, version): cmd = '%s ls-remote %s -t refs/tags/%s' % (git_path, remote, version) - (rc, out, err) = module.run_command(cmd, check_rc=True) + (rc, out, err) = module.run_command(cmd, check_rc=True, cwd=dest) if version in out: return True else: @@ -291,7 +291,7 @@ def get_tags(git_path, module, dest): def is_remote_branch(git_path, module, dest, remote, version): cmd = '%s ls-remote %s -h refs/heads/%s' % (git_path, remote, version) - (rc, out, err) = module.run_command(cmd, check_rc=True) + (rc, out, err) = module.run_command(cmd, check_rc=True, cwd=dest) if version in out: return True else: