skia updating (git)

14 views
Skip to first unread message

Clark Kent

unread,
Sep 16, 2022, 9:58:41 PMSep 16
to skia-discuss
what would be the correct way to update skia from git?

assuming skia is a submodule and we do not want any dangling "untracked files"

for example

externals\skia> git status
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        include/core/SkCombinationBuilder.h
        include/third_party/skcms/
        infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite.json
        infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_NoGpu.json
        infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_NoPrecompile.json
        infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Release-Graphite.json
        infra/bots/recipe_modules/checkout/examples/full.expected/Build-Debian9-Clang-arm-Release-Flutter_Android_Docker.json
        src/core/SkCombinationBuilder.cpp
        src/core/SkFactoryFunctions.cpp
        src/core/SkFactoryFunctions.h
        src/core/SkPrecompile.h
        third_party/skcms/

nothing added to commit but untracked files present (use "git add" to track)

Clark Kent

unread,
Sep 16, 2022, 10:18:01 PMSep 16
to skia-discuss
as one way is

git rm -rf externals/skia
rm -r -force .git/modules/externals/skia
git submodule add -b main https://github.com/google/skia externals/skia

however this involves redownloading all the third_party deps each update

Clark Kent

unread,
Sep 16, 2022, 10:33:19 PMSep 16
to skia-discuss
this also causes skia to be completely rebuilt from scratch

Clark Kent

unread,
Sep 16, 2022, 11:08:37 PMSep 16
to skia-discuss
due to skia/out being deleted

Clark Kent

unread,
Sep 16, 2022, 11:10:28 PMSep 16
to skia-discuss
effectively i want to update skia and purge any removed (untracked) local files and branches

Clark Kent

unread,
Sep 16, 2022, 11:19:19 PMSep 16
to skia-discuss
based on https://stackoverflow.com/questions/61212/how-do-i-remove-local-untracked-files-from-the-current-git-working-tree

it appears we may be able to do

git fetch
git pull
git clean -f -d

git fetch - fetch upstream commits
git pull - merge upstream commits into working tree
git clean -f -d - recursively clean working directory of untracked files and untracked directories, respecting .gitignore

i am not sure about branches tho

Clark Kent

unread,
Sep 16, 2022, 11:24:01 PMSep 16
to skia-discuss
https://stackoverflow.com/questions/7726949/remove-tracking-branches-no-longer-on-remote shows concerning answers (that would be dangerous) for purging untracked branches
Reply all
Reply to author
Forward
0 new messages