[Query] Separate hooks for Git worktrees
- From
Viresh Kumar <viresh.kumar@linaro.org>
- Date
- Nov 9, 2017, 10:58 UTC
- Message-ID
- <CAKohponsPQC6qTw99+xh1RSu0bZNDSo5TbbZZcYmup3NOW6QmA@mail.gmail.com>
Hi,
I have a typical use case, where I am using the same repository for both Android and Linux kernel branches.
Android needs us to keep a special hook "commit-msg" which adds a "Change-Id" to every commit we create.
While this works fine with Android, the behavior doesn't change by simply changing to a upstream kernel branch and eventually by mistake I may end up sending patch with Change-Id to upstream kernel as well. And I want to avoid that.
I am looking at ways to make this configuration work for me by applying the hook only for Android branches.
I tried using the "git worktrees" command to create a separate linked tree for my android branch, but it doesn't have a .git directory but just a file linking to the main repository.
Any idea how I can get around this problem without having separate repositories for kernel and android ?
Thanks in advance.
-- viresh