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

David Bremner david at tethera.net
Sun Jul 13 05:30:56 PDT 2014


"W. Trevor King" <wking at 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


More information about the notmuch mailing list