From: Junio C Hamano Date: Fri, 16 Feb 2007 23:13:21 GMT Subject: Re: [PATCH] Fix incorrect diff of a link -> file change if core.filemode = false. Message-ID: <7vejop1ysu.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <200702170009.02500.johannes.sixt@telecom.at> Johannes Sixt writes: > After this sequence: > > $ ln -s foo A > $ git add A > $ git commit -m link > $ rm A && echo bar > A > > the working copy contains a regular file A but HEAD contains A as a link. > > Normally, at this point 'git diff HEAD' displays this change as a removal > of the link followed by an addition of a new file. But in a repository where > core.filemode is false this is displayed as a modification of the link. > The reason is that the check when the cached mode is allowed to override the > file's actual mode is not strict enough. > > Signed-off-by: Johannes Sixt I do not follow. core.filemode aka trust_executable_bit is about executable bit and not symlink.