Thread (2 messages) 2 messages, 2 authors, 2018-06-04

Re: [PATCH] update-ref --stdin: use skip_prefix()

flat view

From: Jeff King <hidden>
Date: 2018-06-04 03:40:00

On Sun, Jun 03, 2018 at 04:36:51PM +0200, SZEDER Gábor wrote:
Use skip_prefix() instead of starts_with() and strcmp() when parsing
'git update-ref's stdin to avoid a couple of magic numbers.
I was coincidentally looking at this the other day also noticed these.
Thanks for cleaning it up (and your patch looks obviously correct).

I also found it funny that we read the whole input into a buffer and
parse from there, rather than using strbuf_getline(). But that's
intentional due to e23d84350a (update-ref --stdin: read the whole input
at once, 2014-04-07). I think the line-oriented protocol actually can be
easily read like that, but the "-z" format ends up having to do awkward
reads.

Anyway, sort of a tangent, but I didn't want anybody else looking at
this having to dig down the same hole I did. ;)

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help