Laszlo Ersek
2022-Feb-11 14:03 UTC
[Libguestfs] working more easily on libguestfs-common submodule updates
Hi, sorry if this is common knowledge, but I figured I'd share it. I have the following clones: /home/lacos/src/v2v/guestfs-tools /home/lacos/src/v2v/libguestfs /home/lacos/src/v2v/libguestfs-common /home/lacos/src/v2v/virt-v2v In order to modify "libguestfs-common", and immediately put the changes to use in the other three projects (the superprojects); i.e. libguestfs, guestfs-tools, and virt-v2v: (1) Create an *identically-named* development branch in all four projects. (2) In libguestfs-common, implement the change(s) on the new branch (commit them). (3) In the superprojects, run git submodule update --force --init git submodule sync (4) In the three superprojects, apply a patch like this (on the new branch): diff --git a/.gitmodules b/.gitmodules index 1343142128f6..7b1a84418c2b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "common"] path = common - url = https://github.com/libguestfs/libguestfs-common + url = file:///home/lacos/src/v2v/libguestfs-common + branch = . (Commit it.) (5) In the superprojects, run git submodule sync git submodule update --force --remote (Commit the result.) (6) Every time a new change is committed in the libguestfs-common clone, re-run the "git submodule update --remote --force" in the superprojects, and commit the results. (7) After returning to the master branch in the superprojects, re-run step (3). Thanks Laszlo