Re: [PATCH 2/2] nmbug-status: Use 'show-ref --heads' for loading configs

Subject: Re: [PATCH 2/2] nmbug-status: Use 'show-ref --heads' for loading configs

Date: Sun, 13 Jul 2014 09:30:56 -0300

To: W. Trevor King, notmuch@notmuchmail.org

Cc:

From: David Bremner


"W. Trevor King" <wking@tremily.us> writes:

> When loading configs from Git, the bare branch name (without a
> refs/heads/ prefix or similar) matches all branches of that name
> (including remote-tracking branches):
>
>   .nmbug $ git show-ref config
>   48f3bbf1d1492e5f3d2f01de6ea79a30d3840f20 refs/heads/config
>   48f3bbf1d1492e5f3d2f01de6ea79a30d3840f20 refs/remotes/origin/config
>   4b6dbd9ffd152e7476f5101eff26747f34497cee refs/remotes/wking/config
>
> Instead of relying on the ordering of the matching references, use
> --heads to ensure we only match local branches.

ah. I should have read both patches before replying. 

I consider it a useful feature that it works without the user
configuring a local branch.  I agree that in more complex setups this
ambiguity is not as nice, but I'd rather it was only the minority of
users with unusual setups (e.g. multiple remotes) have to do
configuration.

d

Thread: