[openstack-dev] Osl and dangerous code merging

Mac Innes, Kiall kiall at hp.com
Wed Aug 21 19:29:03 UTC 2013


On 21/08/13 19:48, Boris Pavlovic wrote:
> So why submodules are terrible and oslo-sync is good?=)

I think the biggest mistake people make with submodules, which oslo's
sync avoids, is "dropping commits" / Going backwards / Switching
branches on submodule - or worse - pointing at a detached commit.

Olso's sync results in a diff.. Here's what happens when you switch a
submodule:


$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	modified:   cookbooks (new commits)

$ git diff
diff --git a/cookbooks b/cookbooks
index e9e667f..3c3156a 160000
--- a/cookbooks
+++ b/cookbooks
@@ -1 +1 @@
-Subproject commit e9e667f51283abb2e2f174c68adaec683098bcd1
+Subproject commit 3c3156ac0c67ee2334b52fd8e2d298d3433b4281


And WORSE! That submodule is now pointing to a detached commit.

Getting developers - the hundreds of developers involved in OpenStack -
to understand and appreciate this issue, and about 50 other issues, is
not time spent well. Time that will need to be spent over and over again
as OpenStack gains more and more developers.

Thanks,
Kiall



More information about the OpenStack-dev mailing list