Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git filter-repo --path fails on gnu coreutils repo. #600

Open
gl-yziquel opened this issue Sep 20, 2024 · 1 comment
Open

git filter-repo --path fails on gnu coreutils repo. #600

gl-yziquel opened this issue Sep 20, 2024 · 1 comment

Comments

@gl-yziquel
Copy link

Hi.

Version: git-filter-repo v2.45.0

git clone git://git.sv.gnu.org/coreutils.git
cd coreutils
git filter-repo --path src/chroot.c

Fails as follows:

Parsed 29641 commitsTraceback (most recent call last):
  File "/home/mini-me/.pyenv/versions/3.11.8/bin/git-filter-repo", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/mini-me/.pyenv/versions/3.11.8/lib/python3.11/site-packages/git_filter_repo.py", line 4032, in main
    filter.run()
  File "/home/mini-me/.pyenv/versions/3.11.8/lib/python3.11/site-packages/git_filter_repo.py", line 3967, in run
    self._parser.run(self._input, self._output)
  File "/home/mini-me/.pyenv/versions/3.11.8/lib/python3.11/site-packages/git_filter_repo.py", line 1418, in run
    self._parse_tag()
  File "/home/mini-me/.pyenv/versions/3.11.8/lib/python3.11/site-packages/git_filter_repo.py", line 1297, in _parse_tag
    (tagger_name, tagger_email, tagger_date) = self._parse_user(b'tagger')
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mini-me/.pyenv/versions/3.11.8/lib/python3.11/site-packages/git_filter_repo.py", line 1084, in _parse_user
    (name, email, when) = user_regex.match(self._currentline).groups()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'groups'
fatal: stream ends early
fast-import: dumping crash report to .git/fast_import_crash_1886814

I suspect this is because the gnu coreutils repo has kind of a loooooong history going back to old version control systems. And, well, something is None at one point as a consequence of this troubled past.

Nonetheless, this points to some unwanted brittleness in git-filter-repo.

P.S.: thank you for that tool. It has proven to be invaluable to me.

@gl-yziquel
Copy link
Author

I confirm that is an issue specific to the coreutils repository. The same operation succeeded on other repositories such as carving out cipd source code from google's luci-go repository. So, it is definitely some specific setup of coreutils that makes git filter-repo go nuts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant