Fix git get_diff TypeError when fetch (#4881)
This commit is contained in:
parent
8010b7f980
commit
74be5a40f9
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue