Do not apply force flag to git.reset
Return applying force flag to all distros. Instead we don't apply force flag for `git reset` command at all. Change-Id: I81556c641f891773474644f842ff3b07493e8715
This commit is contained in:
parent
fcd5b4c1a9
commit
c7dbdf8e11
@ -121,8 +121,7 @@ def reset_to_version(path, version, reset_type='--hard', force=False,
|
||||
return ["Failed to fetch %s\n%s" % (modify_repo.working_dir, str(e))]
|
||||
|
||||
try:
|
||||
modify_repo.git.reset(reset_type, version,
|
||||
force=force, refspec=refspec)
|
||||
modify_repo.git.reset(reset_type, version, refspec=refspec)
|
||||
except Exception as e:
|
||||
return ["Failed to reset %s\n%s" % (modify_repo.working_dir, str(e))]
|
||||
|
||||
|
@ -130,7 +130,7 @@
|
||||
repo_info: "{{ clone_roles }}"
|
||||
retries: "{{ git_clone_retries }}"
|
||||
delay: "{{ git_clone_retry_delay }}"
|
||||
force: "{{ not (ansible_distribution | lower == 'ubuntu' and ansible_distribution_version is version('20.04', '>=')) }}"
|
||||
force: true
|
||||
core_multiplier: 4
|
||||
rescue:
|
||||
- name: Clone git repos (with git)
|
||||
|
Loading…
x
Reference in New Issue
Block a user