-
Notifications
You must be signed in to change notification settings - Fork 64
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
Rename to "Scalar" #38
Merged
Merged
Conversation
This file contains 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
This should keep all blobs the same, for exact rename matches. Here is the script used to generate these renames: ``` NEWNAME="Scalar" LOWERNAME="scalar" rm -rf .git git init git remote add origin https://github.com/microsoft/gsd git fetch origin master git checkout --detach git branch -f rename origin/master git reset --hard origin/master git checkout rename git clean -xdf mv GVFS GVFS-Old mv GVFS-Old/* . rm -rf GVFS-Old mv "GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset" \ "GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/$NEWNAME.appiconset" rename_in_directory () { ( cd $1 && for file in $(ls | grep "$2") do mv "$file" "$(echo "$file" | sed "s/$2/$3/g")" done for file in $(find . -maxdepth 1 -mindepth 1 -type d) do if [ "$file" != "./.git" ] then rename_in_directory "$file" "$2" "$3" fi done ) } echo "Renaming" rename_in_directory . "GVFS" "$NEWNAME" rename_in_directory . "gvfs" "$NEWNAME" rename_in_directory . "VFSForGit" "$NEWNAME" rename_in_directory . "vfsforgit" "$LOWERNAME" rename_in_directory . "VFS" "$NEWNAME" git add . git commit -q -s -m "[RENAME] Rename all files" -m "This should keep all blobs the same, for exact rename matches." echo "Looking for old names:" git ls-tree -r HEAD | grep VFS ``` Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
This will change many files, and likely not build Here is the script used to do the replacement: ``` NEWNAME="Scalar" LOWERNAME="scalar" for file in $(find . -type f -name '*') do if [[ $file == *.png ]] then continue fi if [[ $file == *.ico ]] then continue fi if [[ $file == *cddl1.txt ]] then continue fi if [[ $file == *.rc ]] then continue fi if [[ $file == *index_v4 ]] then continue fi if [[ $file == ./.git/* ]] then continue fi sed -i .bak "s/GVFS/$NEWNAME/g" "$file" sed -i .bak "s/VFS For Git/$NEWNAME/g" "$file" sed -i .bak "s/VFS for Git/$NEWNAME/g" "$file" sed -i .bak "s/VFSForGit/$NEWNAME/g" "$file" sed -i .bak "s/vfsforgit/$LOWERNAME/g" "$file" sed -i .bak "s/VFS/$NEWNAME/g" "$file" sed -i .bak "s/gvfs/$LOWERNAME/g" "$file" done git commit -a -s -m "[REPLACE] Replace old name in all files" -m "This will change many files, and likely not build" git clean -xdf ``` Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
IT IS DONE. |
I've pulled this locally and tested debug and release as well as the product installation. Works on my box! |
jrbriggs
approved these changes
Aug 11, 2019
@derrickstolee one more:
|
I missed this as I was preparing the merge... oops. I'll get it in a follow-up. See the message for 90e8c1b for the script I used. |
derrickstolee
added a commit
that referenced
this pull request
Aug 12, 2019
When doing the rename, I converted all instances of "VFS" to "Scalar" without first replacing the string "VFS4G". This left a bunch of "Scalar4G" instances around the codebase. Fix that using the same replace logic as before. Fixes a comment from #38.
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.
Resolves #22.
Our new name is "Scalar". This replaces as many instances of the old GVFS, gvfs, VFS for Git, VFSFORGIT, vfsforgit, etc. with "Scalar", "scalar", or "SCALAR" as appropriate.
The commits are organized as follows:
[RENAME] Rename all files
. This is a mechanicalfind
andmv
operation, done by a script. No blobs are changed, so--follow-renames
should get exact values here, unless there are exact duplicate files in the repo. This also flattens the repo, so the old "GVFS/GVFS." pattern is now just "Scalar.".[REPLACE] Replace old name in all files
. This is an attempt to automatically replace all the name strings in the contents of the files. Skips some binary file types.The remaining commits attempt to group the reaction work required to respond to those changes.