]> git.ipfire.org Git - thirdparty/git.git/commit - cache.h
Do not take mode bits from index after type change.
authorJunio C Hamano <junkio@cox.net>
Sat, 17 Feb 2007 06:43:48 +0000 (22:43 -0800)
committerJunio C Hamano <junkio@cox.net>
Sat, 17 Feb 2007 06:56:06 +0000 (22:56 -0800)
commit185c975faaa790a98a4e00f124461473283500d6
tree093c04e201a8bbddfbe2e22b734a458a9505a0ec
parentf44213258de3fbef932f9c655213202f69dccc80
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>
builtin-apply.c
builtin-update-index.c
cache.h
diff-lib.c
read-cache.c
t/t3700-add.sh