git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Alex Vandiver <alex@chmrr.net>
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
	git <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] Make section_name_match start on '[', and return the length on success
Date: Sat, 25 Jul 2009 10:39:04 -0700	[thread overview]
Message-ID: <7vbpn8u0g7.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1248542170-sup-4264@utwig> (Alex Vandiver's message of "Sat\, 25 Jul 2009 13\:18\:52 -0400")

Alex Vandiver <alex@chmrr.net> writes:

> At Sat Jul 25 10:09:56 -0400 2009, Johannes Schindelin wrote:
>> 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.
>
>> 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?

  reply	other threads:[~2009-07-25 17:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24 21:21 [PATCH 0/2] Section renaming can lose content Alex Vandiver
2009-07-24 21:21 ` [PATCH 1/2] Make section_name_match start on '[', and return the length on success Alex Vandiver
2009-07-24 21:21   ` [PATCH 2/2] After renaming a section, print any trailing variable definitions Alex Vandiver
2009-07-24 22:11     ` Nanako Shiraishi
2009-07-24 22:26       ` Alex Vandiver
2009-07-26 16:18         ` [PATCH] Make git config fail on variables with no section, as documented Alex Vandiver
2009-07-26 16:49           ` Johannes Schindelin
2009-07-26 19:32             ` Alex Vandiver
2009-07-26 19:48               ` Johannes Schindelin
2009-07-26 20:24                 ` Alex Vandiver
2009-07-24 23:39       ` [PATCH 2/2] After renaming a section, print any trailing variable definitions Junio C Hamano
2009-07-25  0:28         ` (unknown), Nanako Shiraishi
2009-07-25 14:10         ` [PATCH 2/2] After renaming a section, print any trailing variable definitions Johannes Schindelin
2009-07-25 14:09   ` [PATCH 1/2] Make section_name_match start on '[', and return the length on success Johannes Schindelin
2009-07-25 17:18     ` Alex Vandiver
2009-07-25 17:39       ` Junio C Hamano [this message]
2009-07-25 17:41       ` Johannes Schindelin

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vbpn8u0g7.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=alex@chmrr.net \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).