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

minor: Logic error with _commits_referenced_but_removed on a GitHub Gist web url in commit message 😂 #545

Open
Challanger524 opened this issue Feb 23, 2024 · 1 comment
Labels
bug Something isn't working docs Documentation related issues

Comments

@Challanger524
Copy link

After filtering branch got this in suboptimal-issues:

The following commits were filtered out, but referenced in another
commit message. The reference to the now-nonexistent commit hash
(or a substring thereof) was left as-is in any commit messages:
b'c52b069e4be2d87a6d2f'

In my case the only place of mention of that hash is next commit message:

e10: Dealing with Errors in OpenGL (+glDebugMessageCallback)
...
[liam-middlebrook/GLDebugMessageCallback.c](https://gist.github.com/liam-middlebrook/c52b069e4be2d87a6d2f)

While the git-filter-repo source code comment says:

    # A set of commit hash references appearing in commit messages which
    # mapped to a valid commit that was removed entirely in the filtering
    # process.  The commit message will continue to reference the
    # now-missing commit hash, since there was nothing to map it to.
    self._commits_referenced_but_removed = set()

"valid commit that was removed entirely in the filtering", Karl 🤯
This hash never related to my git commit history and appears only in a web-url to a GitHub Gist 😂

Looks like code doesn't verify old commit hashes properly

@newren newren added bug Something isn't working docs Documentation related issues labels Aug 2, 2024
@newren
Copy link
Owner

newren commented Aug 2, 2024

Yeah, seems to be more of a bug in the description than in the code logic; I think I assumed when I wrote the description that any hash-looking things would refer to commits and valid commits. It's not that I didn't verify old commit hashes properly, it's that I didn't do any verification and never pretended to and just assumed that's the only thing that would be mentioned. I could add some, I guess, or I could just update the description appropriately.

Either way, thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docs Documentation related issues
Projects
None yet
Development

No branches or pull requests

2 participants