author | Johannes Schindelin <johannes.schindelin@gmx.de> | |
Wed, 4 Feb 2009 01:50:15 +0000 (02:50 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 4 Feb 2009 06:04:31 +0000 (22:04 -0800) | ||
commit | e1e4389832f32bb6ce029d6a6b110aa9ec768ea8 | |
tree | cb35c5a36915c4f2a93d26d9e4768fa3dc7e530b | tree | snapshot |
parent | bc395643b606ffe7a5c01e2772ae0644c840f368 | commit | diff |
apply: fix access to an uninitialized mode variable, found by valgrind
When 'tpatch' was initialized successfully, st_mode was already taken
from the previous diff. We should not try to override it with data
from an lstat() that was never called.
This is a companion patch to 7a07841(git-apply: handle a patch that
touches the same path more than once better).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When 'tpatch' was initialized successfully, st_mode was already taken
from the previous diff. We should not try to override it with data
from an lstat() that was never called.
This is a companion patch to 7a07841(git-apply: handle a patch that
touches the same path more than once better).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-apply.c | diff | blob | history |