Closed DeeDeeG closed 11 months ago
NERDY GIT NOTES (or why this PR shows so many commits in it):
The alternative to using git subtree
would be to just delete the submodule (as this PR does) and plop the plain files down at vendor/win-iconv
, not set it up there with git subtree
.
The downside of simply plopping the files down is it makes me appear to be the author of the files for the purposes of git blame
. But it would be a lighter-weight way of doing it, since the win-iconv
commit history would not be added to this git repo.
I'm surprised how much I show as the contributor for vendor/win-iconv
in the GitHub UI and in git log
, though. So, this maybe didn't accomplish as much transparency about the authorship of the files as I had hoped. I doubt we will be git blame
ing in the vendor/win-iconv
files in this repo very often, for files that haven't changed since 2016??? But if that ever happens, the way this PR is currently doing things is the vastly superior choice. I just have no idea if using git blame
like that will ever come up at all.
If having this many commits added in this PR is too annoying, confusing or distracting, and if we're never going to git blame
these vendor/win-iconv
files, then vendoring them as plain files (instead of using git subtree) may be preferable.
The CI failure (Node 14 on Windows) is because of old node-gyp. Node 14 is old, basically. The latest Node v14 was Node v14.21.3, which came with npm v6.14.18, which came with node-gyp v5.1.1.
Node-gyp v5.1.1 doesn't support Visual Studio 2022, which is the default in the windows-latest
GitHub-hosted runner now.
I'm going to push a change to the test matrix and see if I can make it work.
A weird intermittent (one-time only???) CI failure again... One of the macOS jobs failed because of the invalid mode 'rU'
thing, but node-gyp v5.1.1 should be using Python2 preferentially, I don't even know why the heck it would hit a Python 3.11-related error?????????
I re-ran it and it's fine??????????????????????????????????????????????????????/
(Please ignore the amount of question marks, I am going insane, why you gotta do me like this, CI?)
You can verify this is done properly by doing a diff
of the before and after.
This output is good. It shows that all the actual files of the win-iconv
repo are checked in on this PR's branch identically to how they were in the submodule. But now that the vendor/win-iconv/
dir isn't a submodule anymore, it doesn't have (or need) its own git repo metadata dir vendor/win-iconv/.git/
anymore. This is all good, and the diff command output matches exactly with what was intended.
Thanks for the approve, merging now!
Add win-iconv files using git subtree
This replaces what used to be a submodule of the win-iconv repo.
Using git subtree preserves revision history, author info (including git blame view), and so on.
win-iconv is a very small repo, it's public domain, and it has few revisions. So, I think it's worth it to do all that, for giving proper attribution of author info, if for no other reason.
Not using a submodule is more compatible with newer npm (npm 7.x+), and apparently with Yarn (v1.x?) as well. It's overall less complicated for end users of the superstring package/repo.
Add 'vendor/win-iconv/' from commit ' 9f98392dfecadffd62572e73e9aba878e03496c4 '
git-subtree-dir: vendor/win-iconv git-subtree-mainline: 5b2f39d3319ab9a568b1afff4a23be9ece458cc1 git-subtree-split: 9f98392dfecadffd62572e73e9aba878e03496c4