build-sys: added githooks to do Change-Id insertion/filtering.
authorKrisztian Litkey <kli@iki.fi>
Fri, 4 Oct 2013 11:36:13 +0000 (14:36 +0300)
committerKrisztian Litkey <kli@iki.fi>
Fri, 4 Oct 2013 11:53:15 +0000 (14:53 +0300)
commit1fafeee01ace600a16bc70bc2c43c039bd2ab893
treead58fe24f072918fd9c71a2dde87163cdabbe993
parent0461162cc10a6f8424ee348b6ec52a2b074b6030
build-sys: added githooks to do Change-Id insertion/filtering.

Added a bunch of git hooks that collectively try to automatically
insert or filter gerrit Change-Id tags depending on the branch name.
Branches matching *tizen* will have tags inserted other will have
tags filtered out. If you have a bunch of existing commits where
you want do a bulk insert/filter operation, just run git rebase -i
over the range of commits, mark all for rewording, and the hooks
will (try to) do the right thing for you.

To get the name-based insertion/filtering logic working correctly
over rebases, we have to save the branch name in a pre-rebase hook,
use the saved name if it exists or dig it out if not in the
commit-msg hook, and remove the saved name in a post-rewrite hook.
githooks/commit-msg [new file with mode: 0755]
githooks/post-rewrite [new file with mode: 0755]
githooks/pre-rebase [new file with mode: 0755]