Update local_mods in git.py to show destination of conflict (#72405)

Git module, specify that the local modification is in the destination directory so that some of the users clearly understand this..
pull/76679/head
Emyll Almonte 3 years ago committed by GitHub
parent 094a0746b3
commit a08bcca934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
minor_changes:
- git - display the destination directory path in error msg when local_mods detects local modifications conflict so that users see the exact location

@ -1304,11 +1304,11 @@ def main():
if local_mods: if local_mods:
# failure should happen regardless of check mode # failure should happen regardless of check mode
if not force: if not force:
module.fail_json(msg="Local modifications exist in repository (force=no).", **result) module.fail_json(msg="Local modifications exist in the destination: " + dest + " (force=no).", **result)
# if force and in non-check mode, do a reset # if force and in non-check mode, do a reset
if not module.check_mode: if not module.check_mode:
reset(git_path, module, dest) reset(git_path, module, dest)
result.update(changed=True, msg='Local modifications exist.') result.update(changed=True, msg='Local modifications exist in the destination: ' + dest)
# exit if already at desired sha version # exit if already at desired sha version
if module.check_mode: if module.check_mode:

Loading…
Cancel
Save