Commit 92a1ac67 authored by Jérome Perrin's avatar Jérome Perrin

install_monitor: handle submodules

describes the options, but in fact ignore them for now
parent 6f60a5eb
......@@ -66,7 +66,18 @@ class GitInstallMonitor(object):
def _record_changes(self, message):
start = time.time()
self._logger.debug("Adding %s to git, this may take some time", self._work_tree)
if self._git("status", "--porcelain"):
# One problem is that buildout directory contain git repositories, wich `git add` below
# will treat as submodules.
# I see several options:
# * add the content of these git repositories as normal files using plumbing commands (see
# https://www.git-scm.com/book/en/v2/Git-Internals-Git-Objects)
# * manage them as submodules (see https://stackoverflow.com/a/4162672 https://stackoverflow.com/a/4185579
# because git add does not seem to make a managed submodule )
# * just ignore them.
#
# for now, they are ignored.
if self._git("status", "--ignore-submodules", "--porcelain"):
self._git("add", self._work_tree)
self._git("commit", "-m", message)
self._logger.debug("Added %s to git in %.2f seconds", self._work_tree, time.time() - start)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment