From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Junio C Hamano'" <gitster@pobox.com>
Cc: <git@vger.kernel.org>
Subject: RE: [Question] worktree vs. gitdir in [includeIf]
Date: Fri, 9 Jul 2021 18:37:36 -0400 [thread overview]
Message-ID: <009d01d77513$07b638d0$1722aa70$@nexbridge.com> (raw)
In-Reply-To: <xmqqk0m0brq1.fsf@gitster.g>
On July 8, 2021 2:12 PM, Junio C Hamano wrote:
>To: Randall S. Becker <rsbecker@nexbridge.com>
>Cc: git@vger.kernel.org
>Subject: Re: [Question] worktree vs. gitdir in [includeIf]
>
>"Randall S. Becker" <rsbecker@nexbridge.com> 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
next prev parent reply other threads:[~2021-07-09 22:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 17:25 [Question] worktree vs. gitdir in [includeIf] Randall S. Becker
2021-07-08 18:11 ` Junio C Hamano
2021-07-08 18:15 ` Randall S. Becker
2021-07-09 22:37 ` Randall S. Becker [this message]
2021-07-12 22:22 ` Randall S. Becker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='009d01d77513$07b638d0$1722aa70$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.