Fix git get_diff TypeError when fetch (#4881)

This commit is contained in:
Toopy 2016-09-20 16:50:42 +02:00 committed by Matt Clay
parent 8010b7f980
commit 74be5a40f9

View file

@ -424,7 +424,8 @@ def get_diff(module, git_path, dest, repo, remote, depth, bare, before, after):
return { 'prepared': '>> Newly checked out %s' % after } return { 'prepared': '>> Newly checked out %s' % after }
elif before != after: elif before != after:
# Ensure we have the object we are referring to during git diff ! # Ensure we have the object we are referring to during git diff !
fetch(git_path, module, repo, dest, after, remote, depth, bare, '') git_version_used = git_version(git_path, module)
fetch(git_path, module, repo, dest, after, remote, depth, bare, '', git_version_used)
cmd = '%s diff %s %s' % (git_path, before, after) cmd = '%s diff %s %s' % (git_path, before, after)
(rc, out, err) = module.run_command(cmd, cwd=dest) (rc, out, err) = module.run_command(cmd, cwd=dest)
if rc == 0 and out: if rc == 0 and out: