From 4b0e3c6664b58dff626468a1aa19d4ccc390bc95 Mon Sep 17 00:00:00 2001 From: Dhaval Purohit Date: Fri, 28 Feb 2020 09:39:29 +0100 Subject: [PATCH] Submodule update documentation (#2071) * Add documentation to update the submodules (#2066) Co-authored-by: Itay Cohen --- docs/source/building.rst | 1 - docs/source/code.rst | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/docs/source/building.rst b/docs/source/building.rst index d220cc46..e07cd472 100644 --- a/docs/source/building.rst +++ b/docs/source/building.rst @@ -276,4 +276,3 @@ The workaround is to either add the `--disable-new-dtags` linker flag when compi cmake -DCMAKE_EXE_LINKER_FLAGS="-Wl,--disable-new-dtags" .. - diff --git a/docs/source/code.rst b/docs/source/code.rst index 77d7acd5..ace8f81b 100644 --- a/docs/source/code.rst +++ b/docs/source/code.rst @@ -177,3 +177,39 @@ Functions documentation ~~~~~~~~~~~~~~~~~~~~~~~ You can find the classes documentation in the API Reference menu item. + +Updating the submodules +~~~~~~~~~~~~~~~~~~~~~~~ + +Git submodules play a major part in Cutter. This, because Cutter is powered +by radare2, its parent project, and it tries to stay up-to-date with its +recent version, which allows us to implement new features, and enjoy bug +fixes and performance improvements on radare2. Often, we need to update +the radare2 submodule or others, in order to push the most recent +version of them to Cutter. + +You can view the list of all the submodules from the cutter root folder with: + +.. code:: sh + + git config --file .gitmodules --get-regexp path | awk '{ print $2 }' + +To update all the submodules at once, run these commands from the +cutter root folder: + +.. code:: sh + + git submodule foreach git pull origin master + git add submodule_name_1 submodule_name_2 + git commit -m "Update submodules" + +More likely, you'll only need to update the radare2 submodule. +In order to update one submodule individually, use the following code: + +.. code:: sh + + cd radare2 + git checkout master && git pull + cd .. + git add radare2 + git commit -m "Update radare2 submodule"