summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2016-05-11 13:16:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-05-12 19:21:24 (GMT)
commitdcde8b3dcd8d4411a2311fa0a93ca4ca3b26d61f (patch)
tree805a6fe6792bce5d7977000e7ff1009d0edfb409 /builtin/apply.c
parentd1b27ced9a38ed03e99422b6cb24ff95c7437663 (diff)
downloadgit-dcde8b3dcd8d4411a2311fa0a93ca4ca3b26d61f.zip
git-dcde8b3dcd8d4411a2311fa0a93ca4ca3b26d61f.tar.gz
git-dcde8b3dcd8d4411a2311fa0a93ca4ca3b26d61f.tar.bz2
builtin/apply: move 'read_stdin' global into cmd_apply()
The 'read_stdin' 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>
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 5a1d65a..c911e4e 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -78,7 +78,6 @@ static enum ws_ignore {
static const char *patch_input_file;
static struct strbuf root = STRBUF_INIT;
-static int read_stdin = 1;
static void parse_whitespace_option(const char *option)
{
@@ -4517,6 +4516,7 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
int is_not_gitdir = !startup_info->have_repository;
int force_apply = 0;
int options = 0;
+ int read_stdin = 1;
const char *whitespace_option = NULL;