summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2016-05-11 13:16:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-05-12 19:21:19 (GMT)
commitd1b27ced9a38ed03e99422b6cb24ff95c7437663 (patch)
tree95d19e02d91c2d823fc7b6b6450c4b41fcbe9abf
parent7a3eb9e2224d883df229fe4adce51e762165573a (diff)
downloadgit-d1b27ced9a38ed03e99422b6cb24ff95c7437663.zip
git-d1b27ced9a38ed03e99422b6cb24ff95c7437663.tar.gz
git-d1b27ced9a38ed03e99422b6cb24ff95c7437663.tar.bz2
builtin/apply: move 'options' variable into cmd_apply()
The 'options' variable doesn't need to be static and global to the file. It can be local to cmd_apply(), so let's move it there. This will make it easier to libify the apply functionality. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 7bab466..5a1d65a 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -79,7 +79,6 @@ static enum ws_ignore {
static const char *patch_input_file;
static struct strbuf root = STRBUF_INIT;
static int read_stdin = 1;
-static int options;
static void parse_whitespace_option(const char *option)
{
@@ -4517,6 +4516,7 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
int errs = 0;
int is_not_gitdir = !startup_info->have_repository;
int force_apply = 0;
+ int options = 0;
const char *whitespace_option = NULL;