-
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 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 ! Edit: this is probably related to actions/checkout#766 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
I turned the issue into a conversation as it's a change (or possibly regression) in git that causes the error, GitPython didn't seem to have changed. That said, exit code 129 is used specifically in a few places within git but not when diffing. Maybe this code is also used if the process is terminated, which would make me wonder what's terminating it. There seems to be no error output our standard output, making this hard to debug, but maybe the doc section about debugging can help to obtain more information. |
Beta Was this translation helpful? Give feedback.
I turned the issue into a conversation as it's a change (or possibly regression) in git that causes the error, GitPython didn't seem to have changed.
That said, exit code 129 is used specifically in a few places within git but not when diffing. Maybe this code is also used if the process is terminated, which would make me wonder what's terminating it.
There seems to be no error output our standard output, making this hard to debug, but maybe the doc section about debugging can help to obtain more information.