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

addition of first-changed-commits is not backwards-compatible #619

Open
tamird opened this issue Dec 12, 2024 · 0 comments
Open

addition of first-changed-commits is not backwards-compatible #619

tamird opened this issue Dec 12, 2024 · 0 comments

Comments

@tamird
Copy link

tamird commented Dec 12, 2024

In a repo where git-filter-repo has already run, upgrading past d176bfb explodes:

Traceback (most recent call last):
  File "/Users/tamird/.local/bin/b4", line 8, in <module>
    sys.exit(cmd())
  File "/Users/tamird/.local/share/uv/tools/b4/lib/python3.8/site-packages/b4/command.py", line 417, in cmd
    cmdargs.func(cmdargs)
  File "/Users/tamird/.local/share/uv/tools/b4/lib/python3.8/site-packages/b4/command.py", line 83, in cmd_prep
    b4.ez.cmd_prep(cmdargs)
  File "/Users/tamird/.local/share/uv/tools/b4/lib/python3.8/site-packages/b4/ez.py", line 2831, in cmd_prep
    return edit_cover()
  File "/Users/tamird/.local/share/uv/tools/b4/lib/python3.8/site-packages/b4/ez.py", line 790, in edit_cover
    store_cover(new_cover, tracking)
  File "/Users/tamird/.local/share/uv/tools/b4/lib/python3.8/site-packages/b4/ez.py", line 659, in store_cover
    frf.run()
  File "/Users/tamird/.local/share/uv/tools/b4/lib/python3.8/site-packages/git_filter_repo.py", line 4936, in run
    self._record_metadata(self.results_tmp_dir(), self._orig_refs)
  File "/Users/tamird/.local/share/uv/tools/b4/lib/python3.8/site-packages/git_filter_repo.py", line 4767, in _record_metadata
    self._compute_metadata(metadata_dir, orig_refs)
  File "/Users/tamird/.local/share/uv/tools/b4/lib/python3.8/site-packages/git_filter_repo.py", line 4648, in _compute_metadata
    with open(os.path.join(metadata_dir, b'first-changed-commits'), 'br') as f:
FileNotFoundError: [Errno 2] No such file or directory: b'.git/filter-repo/first-changed-commits'

I believe that's because the new code assumes that the presence of already_ran implies the presence of first-changed-commits. This assumption is violated in the case of a version upgrade.

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