From: Johannes Sixt Date: Tue, 27 Feb 2007 21:41:40 GMT Subject: [PATCH] diff-lib.c: Ignore type differences if the filesystem does not support symlinks. Message-ID: <11726125062739-git-send-email-johannes.sixt@telecom.at> In-Reply-To: <11726125052184-git-send-email-johannes.sixt@telecom.at> If core.symlinks = false, the diff engine now compares the symlink in the index or in the database with the file contents on disk (instead of insisting in a symlink in the working copy). As a side effect, git status now reports a change as "modified" instead of "typechange". Signed-off-by: Johannes Sixt --- diff-lib.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/diff-lib.c b/diff-lib.c index 60c0fa6..3a12f65 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -134,6 +134,9 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed) S_ISREG(newmode) && S_ISREG(oldmode) && ((newmode ^ oldmode) == 0111)) newmode = oldmode; + else if (!trust_symlink_fmt && + S_ISREG(newmode) && S_ISLNK(oldmode)) + newmode = oldmode; diff_change(&revs->diffopt, oldmode, newmode, ce->sha1, (changed ? null_sha1 : ce->sha1), ce->name, NULL); -- 1.5.0.19.gddff