[PATCH] apply --cached: fix crash in subdirectory
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 21, 2007, 01:17 UTC
- Message-ID
- <Pine.LNX.4.63.0701210212410.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- 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 <knoppix@zweitrechner.(none)> ---
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