Skip to content

lisa_shell: use git submodule sync to update the remote of the submodules

Darryl Green requested to merge github/fork/JaviMerino/git_submodule_sync into master

Created by: JaviMerino

lisa-update fails to update submodules when they change their remote:

---8<--- $ git clone git@github.com:ARM-software/lisa.git Cloning into 'lisa'... remote: Counting objects: 2058, done. remote: Total 2058 (delta 0), reused 0 (delta 0), pack-reused 2058 Receiving objects: 100% (2058/2058), 16.44 MiB | 3.61 MiB/s, done. Resolving deltas: 100% (1266/1266), done. Checking connectivity... done. $ cd lisa $ source init_env [...] [LISAShell lisa] > ls libs/devlib [LISAShell lisa] > lisa-update

*** Update LISA installation

Developer mode ENABLED, updating local libraries... Submodule 'libs/bart' (https://github.com/ARM-Software/bart.git) registered for path 'libs/bart' Submodule 'libs/devlib' (https://github.com/derkling/devlib.git) registered for path 'libs/devlib' Submodule 'libs/trappy' (https://github.com/ARM-Software/trappy.git) registered for path 'libs/trappy' Cloning into 'libs/bart'... remote: Counting objects: 618, done. remote: Total 618 (delta 0), reused 0 (delta 0), pack-reused 618 Receiving objects: 100% (618/618), 667.41 KiB | 711.00 KiB/s, done. Resolving deltas: 100% (288/288), done. Checking connectivity... done. Submodule path 'libs/bart': checked out '290caafb' Cloning into 'libs/devlib'... remote: Counting objects: 482, done. remote: Total 482 (delta 0), reused 0 (delta 0), pack-reused 482 Receiving objects: 100% (482/482), 6.01 MiB | 2.33 MiB/s, done. Resolving deltas: 100% (276/276), done. Checking connectivity... done. Submodule path 'libs/devlib': checked out '95aaa266' Cloning into 'libs/trappy'... remote: Counting objects: 4241, done. remote: Compressing objects: 100% (61/61), done. remote: Total 4241 (delta 27), reused 0 (delta 0), pack-reused 4180 Receiving objects: 100% (4241/4241), 9.84 MiB | 4.65 MiB/s, done. Resolving deltas: 100% (2904/2904), done. Checking connectivity... done. Submodule path 'libs/trappy': checked out 'efdf0dae' DONE

[LISAShell lisa] > git fetch https://github.com/derkling/lisa.git for-master remote: Counting objects: 4, done. remote: Total 4 (delta 3), reused 3 (delta 3), pack-reused 1 Unpacking objects: 100% (4/4), done. From https://github.com/derkling/lisa

  • branch for-master -> FETCH_HEAD [LISAShell lisa] > git checkout FETCH_HEAD M libs/devlib Note: checking out 'FETCH_HEAD'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

git checkout -b new_branch_name

HEAD is now at e7b4350e... submodules: track mainline devlib repository [LISAShell lisa] > lisa-update

*** Update LISA installation

Developer mode ENABLED, updating local libraries... Submodule 'libs/bart' (https://github.com/ARM-Software/bart.git) registered for path 'libs/bart' Submodule 'libs/devlib' (https://github.com/ARM-Software/devlib.git) registered for path 'libs/devlib' Submodule 'libs/trappy' (https://github.com/ARM-Software/trappy.git) registered for path 'libs/trappy' fatal: reference is not a tree: 91f4f97a Unable to checkout '91f4f97a' in submodule path 'libs/devlib' DONE

[LISAShell lisa] > ---8<---

Use "git submodule sync" instead of messing up with the .git/config as it seems to be the recommended way.

Merge request reports