You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
invalid literal for int() with base 10: 'x' when diffing commits #1483
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/git/cmd.py", line 114, in pump_stream
handler(line)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/git/diff.py", line 570, in <lambda>
handle_process_output(proc, lambda byt: cls._handle_diff_line(byt, repo, index),
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/git/diff.py", line 557, in _handle_diff_line
python-BaseException
diff = Diff(repo, a_path, b_path, a_blob_id, b_blob_id, old_mode, new_mode,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/git/diff.py", line 303, in __init__
self.a_mode = mode_str_to_int(a_mode) if a_mode else None
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/git/objects/util.py", line 80, in mode_str_to_int
mode += int(char) << iteration * 3
ValueError: invalid literal for int() with base 10: 'x'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 946, in run
self._target(*self._args, **self._kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/git/cmd.py", line 120, in pump_stream
raise CommandError([f'<{name}-pump>'] + remove_password_if_present(cmdline), ex) from ex
git.exc.CommandError: Cmd('<stdout-pump>') failed due to: ValueError('invalid literal for int() with base 10: 'x'')
cmdline: <stdout-pump> git diff-tree 81a1f0c4f84aeb6ee97edea64251419515eff571 8c38dfe86157463d745c453d9a1d8c066cc9b7c5 -r --abbrev=40 --full-index -M --raw -z --no-color
This is my first time posting an issue, so please tell me what extra information is needed!
Activity
Byron commentedon Aug 26, 2022
It couldn't parse the output of this command:
If executed by hand, it should yield the output which ideally is posted here. That way it should become clear why it tries to parse
xas integer.[-]Problem when using Diff[/-][+]`invalid literal for int() with base 10: 'x'` when diffing commits[/+]langfield commentedon Sep 14, 2022
This was fixed by #1491.
EliahKagan commentedon Jul 20, 2026
This has just been closed as not planned, but wasn't it actually fixed in #1491?