]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/install: improve updating submodules procedure 48464/head
authorZac Dover <zac.dover@gmail.com>
Wed, 12 Oct 2022 08:27:42 +0000 (18:27 +1000)
committerZac Dover <zac.dover@gmail.com>
Wed, 12 Oct 2022 17:44:48 +0000 (03:44 +1000)
This commit beefs up the "Updating Submodules" procedure,
which (prior to this commit) was quite brief.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 9382a90342f96cabab4b7caf816d9381f77e7f46)

doc/install/clone-source.rst

index 2de8518cdda4f82020bafca36f794a207dcdb051..f394366e5299c2ded3ab0fa88ae44e94972655de 100644 (file)
@@ -81,9 +81,85 @@ repository.
        cd ceph
        git status
 
-If your submodules are out of date, run::
-
-       git submodule update --force --init --recursive
+.. _update-submodules:
+
+Updating Submodules
+-------------------
+
+#. Determine whether your submodules are out of date:
+
+   .. prompt:: bash $
+
+      git status
+
+   #. If your submodules are up to date 
+         If your submodules are up to date, the following console output will
+         appear: 
+
+         ::
+   
+           On branch main
+           Your branch is up to date with 'origin/main'.
+           
+           nothing to commit, working tree clean
+   
+         If you see this console output, then your submodules are up to date.
+         You do not need this procedure.
+
+
+   #. If your submodules are not up to date 
+         If your submodules are not up to date, you will see a message that
+         includes a list of "untracked files". The example here shows such a
+         list, which was generated from a real situation in which the
+         submodules were no longer current. Your list of files will not be the
+         same as this list of files, but this list is provided as an example.
+         If in your case any untracked files are listed, then you should
+         continue to the next step of this procedure.
+
+         ::
+
+            On branch main
+            Your branch is up to date with 'origin/main'.
+            
+            Untracked files:
+              (use "git add <file>..." to include in what will be committed)
+            src/pybind/cephfs/build/
+            src/pybind/cephfs/cephfs.c
+            src/pybind/cephfs/cephfs.egg-info/
+            src/pybind/rados/build/
+            src/pybind/rados/rados.c
+            src/pybind/rados/rados.egg-info/
+            src/pybind/rbd/build/
+            src/pybind/rbd/rbd.c
+            src/pybind/rbd/rbd.egg-info/
+            src/pybind/rgw/build/
+            src/pybind/rgw/rgw.c
+            src/pybind/rgw/rgw.egg-info/
+            
+            nothing added to commit but untracked files present (use "git add" to track)
+
+#. If your submodules are out of date, run the following commands:
+
+   .. prompt:: bash $
+
+      git submodule update --force --init --recursive
+      git clean -fdx
+      git submodule foreach clean -fdx
+
+#. Run ``git status`` again:
+
+   .. prompt:: bash $
+
+      git status
+   
+   Your submodules are up to date if you see the following message:
+
+   ::
+
+     On branch main
+     Your branch is up to date with 'origin/main'.
+     
+     nothing to commit, working tree clean
 
 Choose a Branch
 ===============