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>

Christian Couder committed May 11, 2016 at 15:16 UTC dcde8b3dcd8d4411a2311fa0a93ca4ca3b26d61f
1 file changed +1 -1
builtin/apply.c
+1 -1
@@ -78,7 +78,6 @@ static enum ws_ignore {
78
79 static const char *patch_input_file;
80 static struct strbuf root = STRBUF_INIT;
81 -static int read_stdin = 1;
81
82 static void parse_whitespace_option(const char *option)
83 {
@@ -4517,6 +4516,7 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
4516 int is_not_gitdir = !startup_info->have_repository;
4517 int force_apply = 0;
4518 int options = 0;
4519 + int read_stdin = 1;
4520
4521 const char *whitespace_option = NULL;
4522