From: David Bryson <david@statichacks.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Use "git_config_string" to simplify "remote.c" code in "handle_config"
Date: Mon, 6 Oct 2008 12:53:52 -0700 [thread overview]
Message-ID: <20081006195352.GS5774@eratosthenes.cryptobackpack.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0810061610400.22125@pacific.mpi-cbg.de.mpi-cbg.de>
Johannes,
On Mon, Oct 06, 2008 at 04:13:17PM +0200 or thereabouts, Johannes Schindelin wrote:
> Hi,
>
> On Thu, 2 Oct 2008, David Bryson wrote:
>
> >
> > Signed-off-by: David Bryson <david@statichacks.org>
> >
> > I tried to keep with the naming/coding conventions that I found in
> > remote.c. Feedback welcome.
> >
> > ---
>
> Usually this comment goes after the --- but other than that, the form is
> as perfect as you can wish for.
I see, still trying to remember all the little tricks for proper
submission, thanks.
> > @@ -314,15 +315,15 @@ static int handle_config(const char *key, const char *value, void *cb)
> > return 0;
> > branch = make_branch(name, subkey - name);
> > if (!strcmp(subkey, ".remote")) {
> > - if (!value)
> > - return config_error_nonbool(key);
> > - branch->remote_name = xstrdup(value);
> > + if (git_config_string(&v, key, value) )
> > + return -1;
> > + branch->remote_name = v;
>
> What is the reason not to write
>
> if (git_config_string(&branch->remote_name, key, value))
> return -1;
The only reason is it did not come to mind ;-) But it does make the
statement somewhat clearer.
> ? (Also note that we do not like the space between the two closing
> parentheses.)
An oversight to be sure and not intentional, I read the CodingGuidelines
very carefully ;-)
Dave
prev parent reply other threads:[~2008-10-06 19:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-03 3:39 [PATCH] Use "git_config_string" to simplify "remote.c" code in "handle_config" David Bryson
2008-10-03 5:28 ` Andreas Ericsson
2008-10-03 20:06 ` David Bryson
2008-10-04 22:46 ` Alex Riesen
2008-10-06 19:49 ` David Bryson
2008-10-06 14:13 ` Johannes Schindelin
2008-10-06 19:53 ` David Bryson [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=20081006195352.GS5774@eratosthenes.cryptobackpack.org \
--to=david@statichacks.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).