Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/2] Make section_name_match start on '[', and return the length on success

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:06

Alex Vandiver [off-list ref] writes:
At Sat Jul 25 10:09:56 -0400 2009, Johannes Schindelin wrote:
quoted
Is this not unnecessary, given that we  only call that function when we 
know that buf[0] == '[':
Yes.  However, given that I had changed the calling convention for the
code, (it used to be passed the string starting just _inside_ the
'['), I wanted to make the new calling convention clearer, and catch
any places that were using the old convention.
It's Ok.  I do not think this is performance critical part of the system,
and I'd feel safer with a bit of defensive programming like this,
especially because "git config" that writes (reader is Ok) has
traditionally been one of the most fragile part of the system.
I'm happy to submit a new version without it, if you wish.
quoted
I was a bit surprised that "offset" is not used further in your patch, but 
I saw that 2/2 uses it.
Yeah, this hunk should probably have gone in 2/2 instead.
I actually thought about suggesting to squash these two patches into one,
as the change in [1/2] only makes sense in the context of the [2/2], but
decided against it.

I haven't applied (actually, I didn't even notice until this morning) the
small documentation update from Nana.  Have any comments on that one?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help