Re: [PATCH v2] grep: support the --pathspec-from-file option
From: Johannes Schindelin <hidden>
Date: 2019-12-06 11:23:04
Subsystem:
the rest · Maintainer:
Linus Torvalds
Hi Emily, On Wed, 4 Dec 2019, Emily Shaffer wrote:
quoted hunk ↗ jump to hunk
diff --git a/builtin/grep.c b/builtin/grep.c index 50ce8d9461..54ba991c42 100644 --- a/builtin/grep.c +++ b/builtin/grep.c@@ -809,6 +813,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix) int use_index = 1; int pattern_type_arg = GREP_PATTERN_TYPE_UNSPECIFIED; int allow_revs; + char *pathspec_from_file; + int pathspec_file_nul; struct option options[] = {
I need this on top to make it work without problems (I have not yet triggered the CI build, but I will in a moment): -- snipsnap -- Subject: [PATCH] fixup??? grep: support the --pathspec-from-file option We must not use those variables uninitialized, this causes CI build failures left and right (see e.g. https://dev.azure.com/gitgitgadget/git/_build/results?buildId=22821) Signed-off-by: Johannes Schindelin <redacted> --- builtin/grep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 54ba991c425..c2aa1aeebd6 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c@@ -813,8 +813,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix) int use_index = 1; int pattern_type_arg = GREP_PATTERN_TYPE_UNSPECIFIED; int allow_revs; - char *pathspec_from_file; - int pathspec_file_nul; + char *pathspec_from_file = NULL; + int pathspec_file_nul = 0; struct option options[] = { OPT_BOOL(0, "cached", &cached, --
2.24.0.windows.2.611.ge9aced84530