From: Johannes Schindelin Date: Sun, 21 Jan 2007 01:17:19 GMT Subject: [PATCH] apply --cached: fix crash in subdirectory Message-ID: In-Reply-To: <20070120183615.GA6459@admingilde.org> The static variable "prefix" was shadowed by an unused parameter of the same name. In case of execution in a subdirectory, the static variable was accessed, leading to a crash. Signed-off-by: Knoppix User --- On Sat, 20 Jan 2007, Martin Waitz wrote: > git-apply inside the "src" directory segfaulted. Well, that was not the complete truth now, was it? Cannily, you avoided mentioning the use of the "--cached" argument... But as you see, your evil plan failed ;-) builtin-apply.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/builtin-apply.c b/builtin-apply.c index 54fd2cb..ef927f8 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -2589,7 +2589,7 @@ static int git_apply_config(const char *var, const char *value) } -int cmd_apply(int argc, const char **argv, const char *prefix) +int cmd_apply(int argc, const char **argv, const char *prefix2) { int i; int read_stdin = 1; -- 1.5.0.rc1.gd85c