From: Junio C Hamano <gitster@pobox•com>
To: "SZEDER Gábor" <szeder.dev@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH 2/2] ref-filter: add function to parse atoms from a nul-terminated string
Date: Thu, 26 Jan 2017 10:54:57 -0800 [thread overview]
Message-ID: <xmqqvat14poe.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAM0VKjntATMwDTdu1fSmjeLbwVe73iTo2NQizNXjZchBzqG44w@mail.gmail.com> ("SZEDER Gábor"'s message of "Thu, 26 Jan 2017 14:15:38 +0100")
SZEDER Gábor <szeder.dev@gmail•com> writes:
> On Wed, Dec 7, 2016 at 5:09 PM, SZEDER Gábor <szeder.dev@gmail•com> wrote:
>> ref-filter's parse_ref_filter_atom() function parses an atom between
>> the start and end pointers it gets as arguments. This is fine for two
>> of its callers, which process '%(atom)' format specifiers and the end
>> pointer comes directly from strchr() looking for the closing ')'.
>> However, it's not quite so straightforward for its other two callers,
>> which process sort specifiers given as plain nul-terminated strings.
>> Especially not for ref_default_sorting(), which has the default
>> hard-coded as a string literal, but can't use it directly, because a
>> pointer to the end of that string literal is needed as well.
>> The next patch will add yet another caller using a string literal.
>>
>> Add a helper function around parse_ref_filter_atom() to parse an atom
>> up to the terminating nul, and call this helper in those two callers.
>>
>> Signed-off-by: SZEDER Gábor <szeder.dev@gmail•com>
>> ---
>> ref-filter.c | 8 ++------
>> ref-filter.h | 4 ++++
>> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> Ping?
>
> It looks like that this little two piece cleanup series fell on the floor.
I am still waiting for somebody else to comment on the changes, and
the final reroll after such a review discussion to address your own
comment in <CAM0VKjk1mnNzQX6LThq1t7keesBz_fjE9x2e0ywsBKSNKP9SCw@mail•gmail.com>
prev parent reply other threads:[~2017-01-26 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 16:09 [PATCH 0/2] A bit of ref-filter atom parsing cleanups SZEDER Gábor
2016-12-07 16:09 ` [PATCH 1/2] ref-filter, tag: eliminate duplicated sorting option parsing SZEDER Gábor
2016-12-07 16:09 ` [PATCH 2/2] ref-filter: add function to parse atoms from a nul-terminated string SZEDER Gábor
2016-12-08 18:58 ` SZEDER Gábor
2017-01-26 13:15 ` SZEDER Gábor
2017-01-26 18:54 ` Junio C Hamano [this message]
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=xmqqvat14poe.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=szeder.dev@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox