]> asedeno.scripts.mit.edu Git - git.git/commitdiff
apply --cached: fix crash in subdirectory
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Sun, 21 Jan 2007 01:17:19 +0000 (02:17 +0100)
committerJunio C Hamano <junkio@cox.net>
Sun, 21 Jan 2007 03:05:20 +0000 (19:05 -0800)
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: Johannes Schindelin <Johannes.Schindelin@gmx.de>
builtin-apply.c

index 54fd2cb0c71dc97a47d0286d7b201545a7308b01..3fefdacd94526b62ac72707d6d80b039f104c06d 100644 (file)
@@ -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 *unused_prefix)
 {
        int i;
        int read_stdin = 1;