From b45563a229f5150271837cf487a91ddd8224fbd3 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 30 Nov 2007 22:22:38 -0800 Subject: rename: Break filepairs with different types. When we consider if a path has been totally rewritten, we did not touch changes from symlinks to files or vice versa. But a change that modifies even the type of a blob surely should count as a complete rewrite. While we are at it, modernise diffcore-break to be aware of gitlinks (we do not want to touch them). Signed-off-by: Junio C Hamano --- tree-walk.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'tree-walk.h') diff --git a/tree-walk.h b/tree-walk.h index 903a7b0f48..db0fbdc701 100644 --- a/tree-walk.h +++ b/tree-walk.h @@ -7,13 +7,6 @@ struct name_entry { unsigned int mode; }; -static inline enum object_type object_type(unsigned int mode) -{ - return S_ISDIR(mode) ? OBJ_TREE : - S_ISGITLINK(mode) ? OBJ_COMMIT : - OBJ_BLOB; -} - struct tree_desc { const void *buffer; struct name_entry entry; -- cgit v1.2.3