test: add tests for symlinks in gix-blame - #2906
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7047944e4d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".
7047944 to
31a98ed
Compare
|
Thanks a lot! It's good to see that this works, but also still a little bit surprising. So in the interest of time, I asked Codex, so maybe there is something you can additionally poke at. In the worst case, it's more coverage. That's also why I left the comment for now.
The best additional regression test would be:
File↔symlink transitions under such attributes should also be tested because each side requires a different mode. The proper eventual fix is to preserve source/destination modes in |
|
Thanks for the context! I’ve put it onto my list of things that I want to have a look at. 😀 |
This PR adds dedicated tests for symlinks in
gix-blame. None of the tests required any code changes to make them pass. This is based on a TODO mentioned in this comment.I think the
TODOcomment can potentially be removed. We might also want to change it to highlight the fact that we forceset_resourceto treat symlinks as blobs by unconditionally passingEntryKind::Blob. As far as I can tell at least,set_resourcedoes not check on its own whether an object is a symlink, but trusts its caller.