From: Christian Couder <christian.couder@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Karsten Blees" <karsten.blees@gmail.com>,
"Nguyen Thai Ngoc Duy" <pclouds@gmail.com>,
"Stefan Beller" <sbeller@google.com>,
"Eric Sunshine" <sunshine@sunshineco.com>,
"Ramsay Jones" <ramsay@ramsayjones.plus.com>,
"Johannes Sixt" <j6t@kdbg.org>, "René Scharfe" <l.s.r@web.de>,
"Stefan Naewe" <stefan.naewe@atlas-elektronik.com>,
"Christian Couder" <chriscool@tuxfamily.org>
Subject: [PATCH v12 04/13] apply: make some parsing functions static again
Date: Thu, 11 Aug 2016 20:44:52 +0200 [thread overview]
Message-ID: <20160811184501.384-5-chriscool@tuxfamily.org> (raw)
In-Reply-To: <20160811184501.384-1-chriscool@tuxfamily.org>
Some parsing functions that were used in both "apply.c" and
"builtin/apply.c" are now only used in the former, so they
can be made static to "apply.c".
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
apply.c | 6 +++---
apply.h | 5 -----
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/apply.c b/apply.c
index 7b96130..c0cb3f5 100644
--- a/apply.c
+++ b/apply.c
@@ -27,7 +27,7 @@ static void git_apply_config(void)
git_config(git_default_config, NULL);
}
-int parse_whitespace_option(struct apply_state *state, const char *option)
+static int parse_whitespace_option(struct apply_state *state, const char *option)
{
if (!option) {
state->ws_error_action = warn_on_ws_error;
@@ -57,8 +57,8 @@ int parse_whitespace_option(struct apply_state *state, const char *option)
return error(_("unrecognized whitespace option '%s'"), option);
}
-int parse_ignorewhitespace_option(struct apply_state *state,
- const char *option)
+static int parse_ignorewhitespace_option(struct apply_state *state,
+ const char *option)
{
if (!option || !strcmp(option, "no") ||
!strcmp(option, "false") || !strcmp(option, "never") ||
diff --git a/apply.h b/apply.h
index 5ec022c..df44b51 100644
--- a/apply.h
+++ b/apply.h
@@ -97,11 +97,6 @@ struct apply_state {
int applied_after_fixing_ws;
};
-extern int parse_whitespace_option(struct apply_state *state,
- const char *option);
-extern int parse_ignorewhitespace_option(struct apply_state *state,
- const char *option);
-
extern int apply_option_parse_exclude(const struct option *opt,
const char *arg, int unset);
extern int apply_option_parse_include(const struct option *opt,
--
2.9.2.769.gc0f0333
next prev parent reply other threads:[~2016-08-11 18:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 18:44 [PATCH v12 00/13] libify apply and use lib in am, part 3 Christian Couder
2016-08-11 18:44 ` [PATCH v12 01/13] builtin/apply: rename option parsing functions Christian Couder
2016-08-11 18:44 ` [PATCH v12 02/13] apply: rename and move opt constants to apply.h Christian Couder
2016-08-11 18:44 ` Christian Couder [this message]
2016-08-11 18:44 ` [PATCH v12 05/13] apply: use error_errno() where possible Christian Couder
2016-08-11 18:44 ` [PATCH v12 06/13] apply: make it possible to silently apply Christian Couder
2016-08-11 18:44 ` [PATCH v12 07/13] apply: don't print on stdout in verbosity_silent mode Christian Couder
2016-08-11 18:44 ` [PATCH v12 08/13] usage: add set_warn_routine() Christian Couder
2016-08-11 18:44 ` [PATCH v12 09/13] usage: add get_error_routine() and get_warn_routine() Christian Couder
2016-08-11 18:44 ` [PATCH v12 10/13] apply: change error_routine when silent Christian Couder
2016-08-11 18:44 ` [PATCH v12 11/13] apply: refactor `git apply` option parsing Christian Couder
2016-08-11 18:45 ` [PATCH v12 12/13] apply: learn to use a different index file Christian Couder
2016-08-11 20:17 ` Junio C Hamano
2016-08-26 23:46 ` Christian Couder
2016-08-11 18:45 ` [PATCH v12 13/13] builtin/am: use apply API in run_apply() Christian Couder
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=20160811184501.384-5-chriscool@tuxfamily.org \
--to=christian.couder@gmail.com \
--cc=avarab@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=karsten.blees@gmail.com \
--cc=l.s.r@web.de \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=ramsay@ramsayjones.plus.com \
--cc=sbeller@google.com \
--cc=stefan.naewe@atlas-elektronik.com \
--cc=sunshine@sunshineco.com \
/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).