author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Wed, 15 Dec 2010 15:02:39 +0000 (22:02 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 3 Feb 2011 21:04:23 +0000 (13:04 -0800) | ||
commit | 475005a11768a3906c42fac55e8b3371794bdef3 | |
tree | 21e8d4fcf9b88d0ed2d068d73358394c1cdc667c | tree | snapshot |
parent | 66f136252fe1998e2c1381c913795b5f56b6dc8c | commit | diff |
tree_entry_interesting(): remove dependency on struct diff_options
This function can be potentially used in more places than just
tree-diff.c. "struct diff_options" does not make much sense outside
diff_tree_sha1().
While removing the use of diff_options, it also removes
tree_entry_extract() call, which means S_ISDIR() uses the entry->mode
directly, without being filtered by canon_mode() (called internally
inside tree_entry_extract).
The only use of the mode information in this function is to check the
type of the entry by giving it to S_ISDIR() macro, and the result does
not change with or without canon_mode(), so it is ok to bypass
tree_entry_extract().
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This function can be potentially used in more places than just
tree-diff.c. "struct diff_options" does not make much sense outside
diff_tree_sha1().
While removing the use of diff_options, it also removes
tree_entry_extract() call, which means S_ISDIR() uses the entry->mode
directly, without being filtered by canon_mode() (called internally
inside tree_entry_extract).
The only use of the mode information in this function is to check the
type of the entry by giving it to S_ISDIR() macro, and the result does
not change with or without canon_mode(), so it is ok to bypass
tree_entry_extract().
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tree-diff.c | diff | blob | history |