Re: [PATCH v7 05/17] ref-filter: move get_head_description() from branch.c
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Nov 10, 2016, 19:01 UTC
- Message-ID
- <CAOLa=ZQk9kKcYAQ=CXFwDhvg=pyeSaZk+s1pHafY8cvuxzWeEA@mail.gmail.com>
- In-Reply-To
- <CA+P7+xo4M5g15B7zKzC-zJvd6O0Wfpks142-+C8tAqTfyEJ+nA@mail.gmail.com>
On Wed, Nov 9, 2016 at 5:01 AM, Jacob Keller <jacob.keller@gmail.com> wrote:
Show 13 quoted lines
> On Tue, Nov 8, 2016 at 12:11 PM, Karthik Nayak <karthik.188@gmail.com> wrote:
>
>>
>> - if (starts_with(name, "refname"))
>> + if (starts_with(name, "refname")) {
>> refname = ref->refname;
>> - else if (starts_with(name, "symref"))
>> + if (ref->kind & FILTER_REFS_DETACHED_HEAD)
>> + refname = get_head_description();
>
> Since this (I think?) changes behavior of refname would it make sense
> to add a test for this?
>At the moment there is no way to check this, since this option is not used by git for-each-ref or git tag (both of which completely use ref-filter ATM). This is however tested as eventually git branch uses ref-filter.
-- Regards, Karthik Nayak