RE: [Question] worktree vs. gitdir in [includeIf]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On July 8, 2021 2:12 PM, Junio C Hamano wrote:
>To: Randall S. Becker <rsbecker@xxxxxxxxxxxxx>
>Cc: git@xxxxxxxxxxxxxxx
>Subject: Re: [Question] worktree vs. gitdir in [includeIf]
>
>"Randall S. Becker" <rsbecker@xxxxxxxxxxxxx> writes:
>
>> I am wondering whether there is, or are plans for, something analogous
>> to [includeIf "worktree:path"] with a similar semantic to [includeIf
>> "gitdir:path"].
>
>I do not think there currently is an implementation, nor a plan, but I offhand do not see downsides in a feature to let you
conditionally
>enable some configuration based on the location of the worktree.

I'm scratching my head on this a bit. The [includeIf "onbranch:foo"] form is a bit confusing when dealing with a worktree. It looks
like the code either does not work if in a worktree or will get the branch of the main repo instead of the worktree ref. It looks
like include_by_branch() always returns 0 if in a worktree. Is there something being done in skip_prefix() or resolve_ref_unsafe()
that would deal with this?

Thanks,
Randall




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux