author | Junio C Hamano <junkio@cox.net> | |
Sat, 17 Feb 2007 06:43:48 +0000 (22:43 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 17 Feb 2007 06:56:06 +0000 (22:56 -0800) | ||
commit | 185c975faaa790a98a4e00f124461473283500d6 | |
tree | 093c04e201a8bbddfbe2e22b734a458a9505a0ec | tree | snapshot |
parent | f44213258de3fbef932f9c655213202f69dccc80 | commit | diff |
Do not take mode bits from index after type change.
When we do not trust executable bit from lstat(2), we copied
existing ce_mode bits without checking if the filesystem object
is a regular file (which is the only thing we apply the "trust
executable bit" business) nor if the blob in the index is a
regular file (otherwise, we should do the same as registering a
new regular file, which is to default non-executable).
Noticed by Johannes Sixt.
Signed-off-by: Junio C Hamano <junkio@cox.net>
When we do not trust executable bit from lstat(2), we copied
existing ce_mode bits without checking if the filesystem object
is a regular file (which is the only thing we apply the "trust
executable bit" business) nor if the blob in the index is a
regular file (otherwise, we should do the same as registering a
new regular file, which is to default non-executable).
Noticed by Johannes Sixt.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-apply.c | diff | blob | history | |
builtin-update-index.c | diff | blob | history | |
cache.h | diff | blob | history | |
diff-lib.c | diff | blob | history | |
read-cache.c | diff | blob | history | |
t/t3700-add.sh | diff | blob | history |