]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc,tests: force checkout of submodules 3895/head
authorLoic Dachary <ldachary@redhat.com>
Fri, 6 Mar 2015 16:08:55 +0000 (17:08 +0100)
committerLoic Dachary <ldachary@redhat.com>
Fri, 6 Mar 2015 16:16:46 +0000 (17:16 +0100)
When updating submodules, always checkout even if the HEAD is the
desired commit hash (update --force) to avoid the following:

* a directory gmock exists in hammer
* a submodule gmock replaces the directory gmock in master
* checkout master + submodule update : gmock/.git is created
* checkout hammer : the gmock directory still contains the .git from
  master because it did not exist at the time and checkout won't
  remove untracked directories
* checkout master + submodule update : git rev-parse HEAD is
  at the desired commit although the content of the gmock directory
  is from hammer

Signed-off-by: Loic Dachary <ldachary@redhat.com>
autogen.sh
doc/dev/release-process.rst
doc/install/clone-source.rst
src/test/docker-test-helper.sh

index 1e06e26877062ddf29b97b07329463dbbc79c174..a7cc704a20538e920bdd61f0bd46f07212752aad 100755 (executable)
@@ -29,7 +29,7 @@ else
 fi
 
 if test -d ".git" ; then
-  if ! git submodule sync || ! git submodule update --init --recursive; then
+  if ! git submodule sync || ! git submodule update --force --init --recursive; then
     echo "Error: could not initialize submodule projects"
     echo "  Network connectivity might be required."
     exit 1
index f039fd875f47df1c157f2907780bcd4663108d7c..f7e853b1ae478ea27ad0768c30b1af6eb76749e5 100644 (file)
@@ -43,7 +43,7 @@ In the ceph source directory, checkout next branch (for point releases use the {
 
 Checkout the submodules::
 
-    git submodule update --init --recursive
+    git submodule update --force --init --recursive
 
 4.  Update Build version numbers
 ================================
index c7272f2523172c6440dbabc2c6f9ed4d9160f815..fe67857b9a8a78278eac4609cb02b1fbdf068723 100644 (file)
@@ -83,7 +83,7 @@ repository.
 
 If your submodules are out of date, run::
 
-       git submodule update --init --recursive
+       git submodule update --force --init --recursive
 
 Choose a Branch
 ===============
index e7336c083581514aaa8d9204b5700431ca107b85..3035f0250c342dac611d32f082d2643d10e1514a 100755 (executable)
@@ -96,7 +96,7 @@ function setup_downstream() {
         cd $downstream
         git reset --hard $ref || return 1
         git submodule sync --recursive || return 1
-        git submodule update --init --recursive || return 1
+        git submodule update --force --init --recursive || return 1
     )
 }