Add the .git
subdir as another safe.directory
on Cygwin CI
#1916
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.
As shown in this run on my fork, the CI test job for Cygwin is failing now. This fixes that.
The first commit in this pull request just demonstrates that the failure is due to the upgrade of the Cygwin
git
package from 2.43.0-1 to 2.45.1-1. Although that commit makes test pass, I recommend against following that approach, mainly because the new version contains multiple security updates (coming in with the upstream 2.45.1 version, not with any downstream patches), but also because the older version will eventually be dropped from the Cygwin repositories.The better workaround is in the second commit here, which adds the
.git
subdirectory of the clonedGitPython
directory as a value of the multi-valuedsafe.directory
Git configuration variable. Its parent directory is already added, which was previously sufficient, but not anymore.I suspect that, rather than this being any bug in the downstream package, this is actually the correct behavior due to one of the several security fixes in the new version of Git, though I have not verified that. So maybe this is really not a workaround, but a permanent fix.
I believe the reason there is no need to modify any other workflow is that the other workflows don't need to add any
safe.directory
paths at all: they either clone the repository with the necessary ownership in the first place or, in the case of the Alpine Linux job, set the ownership withchown
.