Thread (120 messages) 120 messages, 4 authors, 2016-06-16
STALE3644d REVIEWED: 1 (0M)
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 07/94] builtin/apply: move 'read_stdin' global into cmd_apply()

From: Christian Couder <hidden>
Date: 2016-06-16 02:19:18
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
Signed-off-by: Christian Couder <redacted>
---
 builtin/apply.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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;
 
-- 
2.8.2.490.g3dabe57
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help