-
-
Notifications
You must be signed in to change notification settings - Fork 954
Closed
Description
Since git 2.30.3 has been released, all MegaLinter CI jobs are failing because of the following error within gitpython.
File "/tmp/lint/megalinter/utils.py", line 229, in list_updated_files
changed_files = [item.a_path for item in repo.index.diff(None)]
File "/usr/local/lib/python3.9/site-packages/git/index/base.py", line [1309](https://github.com/megalinter/megalinter/runs/6028533814?check_suite_focus=true#step:5:1309), in diff
return super(IndexFile, self).diff(other, paths, create_patch, **kwargs)
File "/usr/local/lib/python3.9/site-packages/git/diff.py", line 175, in diff
index = diff_method(self.repo, proc)
File "/usr/local/lib/python3.9/site-packages/git/diff.py", line 570, in _index_from_raw_format
handle_process_output(proc, lambda byt: cls._handle_diff_line(byt, repo, index),
File "/usr/local/lib/python3.9/site-packages/git/cmd.py", line 176, in handle_process_output
return finalizer(process)
File "/usr/local/lib/python3.9/site-packages/git/util.py", line 386, in finalize_process
proc.wait(**kwargs)
File "/usr/local/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(129)
cmdline: git diff --abbrev=40 --full-index -M --raw -z --no-color
The gitpython code called is a simple repo.index.diff(None)
def list_updated_files(repo_home):
try:
repo = git.Repo(repo_home)
except git.InvalidGitRepositoryError:
try:
repo = git.Repo(REPO_HOME_DEFAULT)
except git.InvalidGitRepositoryError:
logging.warning("Unable to find git repository to list updated files")
return []
changed_files = [item.a_path for item in repo.index.diff(None)]
return changed_files
I've investigated for some time and the delta between working / not working really seems to be from using git 2.30.3 instead of 2.30.2
You can see the error in this CI job for example: https://github.com/megalinter/megalinter/runs/6028533814?check_suite_focus=true
Would you have some tip to bypass such error ?
Many thanks !
Metadata
Metadata
Assignees
Labels
No labels