Fixing the return value of rename_variable() on Windows#83
Merged
Conversation
ff32057 to
d6ab4ad
Compare
Collaborator
Author
|
The force-push was to correct the commit message. |
In Windows, this avoids that pattern mismatches occur between root and file. Before, this could lead to not removing the root part from the returned vector.
Collaborator
Author
|
As hoped, the Windows check of d6ab4ad demonstrates the issue: It is fixed by f486662. |
florisvdh
added a commit
to inbo/n2khab-preprocessing
that referenced
this pull request
Feb 19, 2026
The proposed git2rdata update fixed a Windows problem with rename_variables(); see ropensci/git2rdata#83.
ThierryO
approved these changes
Feb 19, 2026
Member
ThierryO
left a comment
There was a problem hiding this comment.
Thanks for the PR. I'll fix the other issues raised by checklist.
89254d0 to
d1daf37
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds some fixes related to the return value of
rename_variable().remove_root()was called. During debugging on Windows, it was seen that Windows-specific pattern mismatches occurred between therootandfilearguments ofremove_root(). These could be "\\" vs. "/" as well as user directory abbreviations. ApplyingnormalizePath()on both inputs ofremove_root()before calling the latter, similar to the way this is handled inwrite_vc()(where the problem doesn't pop up), solved it.I'm pushing this in two steps, hoping to see failure of the tests in Windows first, then succes after adding the commit that fixes behaviour.