Граф коммитов

2 Коммитов

Автор SHA1 Сообщение Дата
Derrick Stolee 90e8c1bd69 [REPLACE] Replace old name in all files
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>
2019-08-10 12:41:55 -04:00
Derrick Stolee fb3a2a3635 [RENAME] Rename all files
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>
2019-08-10 12:34:22 -04:00