git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: git@vger.kernel.org
Cc: Junio Hamano <junkio@cox.net>, Pascal Obry <pascal@obry.net>
Subject: [PATCH 1/2] help.c: use 'git_config_string' to get 'help_default_format'.
Date: Sun, 17 Feb 2008 20:52:50 +0100	[thread overview]
Message-ID: <20080217205250.a2b4c3c2.chriscool@tuxfamily.org> (raw)

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 help.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/help.c b/help.c
index 6e28ad9..8143dcd 100644
--- a/help.c
+++ b/help.c
@@ -39,12 +39,8 @@ static void parse_help_format(const char *format)
 
 static int git_help_config(const char *var, const char *value)
 {
-	if (!strcmp(var, "help.format")) {
-		if (!value)
-			return config_error_nonbool(var);
-		help_default_format = xstrdup(value);
-		return 0;
-	}
+	if (!strcmp(var, "help.format"))
+		return git_config_string(&help_default_format, var, value);
 	return git_default_config(var, value);
 }
 
-- 
1.5.4.1.1384.gdeff

                 reply	other threads:[~2008-02-17 19:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080217205250.a2b4c3c2.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=pascal@obry.net \
    /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).