Web lists-archives.com

Re: [Query] Separate hooks for Git worktrees

Stefan Beller <sbeller@xxxxxxxxxx> writes:

> We have no worktree specific config yet, though patches for
> this were floated on the mailing list.
> Though recent versions of git learned to conditionally include
> config files. (look for includeIf in man git-config), which I think
> could be used to set the option gerrit.createChangeId  depending
> on the worktree you are in.
>> Any idea how I can get around this problem without having separate
>> repositories for kernel and android ?
> The proposed approach above might be hacky but sounds as if
> it should work?

If you meant "conditional include" by "proposed approach above", I
do not see which part you found possibly hacky.  It is to allow
different set of configurations to apply depending on where you are
working at, which I think was invented exactly for something like

It certainly is not any hackier than using the same repository to
house separately manged projects even if they may be related

Where does the aversion of "having separate repositories" primarily
come from?  Is it bad due to disk consumption?  Is it bad because
you cannot do "git diff android-branch kernel-branch"?  Something

If it is purely disk consumption that is an issue, perhaps the real
solution is to make it easier to maintain separate repositories
while sharing as much disk space as possible.  GC may have to be
made a lot more robust in the presense of alternate object stores,
for example.