diff options
author | Victor Boivie <victor.boivie@sonyericsson.com> | 2011-04-18 11:23:29 +0200 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2011-07-20 07:34:23 -0700 |
commit | 65e0f35fda0559e79316c8fdbeeaed6dd51e9a4d (patch) | |
tree | 4944d8cc649b3b9af33f11181d27bee7b709adbb | |
parent | 08c880db1882743900ce1ed82b5026566b64d1f5 (diff) | |
download | git-repo-65e0f35fda0559e79316c8fdbeeaed6dd51e9a4d.tar.gz |
Add commit-msg hook also for manifest project
The manifest project has - by design - not a review URL associated
with it. It is actually not even a 'project' in repo's sense.
This will prevent the commit-msg hook from being added, which is
not necessarily wanted as the project is managed in gerrit.
This commit will enable the commit-msg hook, which in turn will
add the Change-Id-line to every new commit in it. This simplifies
replacing patch sets (by git push ... refs/for/...).
Change-Id: I42d0f6fd79e6282d9d47074a3819e68d968999a7
Signed-off-by: Victor Boivie <victor.boivie@sonyericsson.com>
-rw-r--r-- | project.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1484,10 +1484,13 @@ class Project(object): | |||
1484 | for stock_hook in _ProjectHooks(): | 1484 | for stock_hook in _ProjectHooks(): |
1485 | name = os.path.basename(stock_hook) | 1485 | name = os.path.basename(stock_hook) |
1486 | 1486 | ||
1487 | if name in ('commit-msg',) and not self.remote.review: | 1487 | if name in ('commit-msg',) and not self.remote.review \ |
1488 | and not self is self.manifest.manifestProject: | ||
1488 | # Don't install a Gerrit Code Review hook if this | 1489 | # Don't install a Gerrit Code Review hook if this |
1489 | # project does not appear to use it for reviews. | 1490 | # project does not appear to use it for reviews. |
1490 | # | 1491 | # |
1492 | # Since the manifest project is one of those, but also | ||
1493 | # managed through gerrit, it's excluded | ||
1491 | continue | 1494 | continue |
1492 | 1495 | ||
1493 | dst = os.path.join(hooks, name) | 1496 | dst = os.path.join(hooks, name) |