tree.c: Nuke match_tree_entry(), it just duplicates tree_entry_interesting()
RFC PATCH 1/1 tree.c: Nuke match_tree_entry(), it just duplicates tree_entry_interesting()
WARNING: RFC because: This has a minor conflict with my sparse-clone series, and a less minor conflict with Nguyễn Thái Ngọc Duy's updates to the en/object-list-with-pathspec series. Duy's changes to en/object-list-with-pathspec, at least with my additional suggestions, should probably also be applied to en/tree-walk-optim for skip_uninteresting. If all that other stuff is done, this particular patch could be made smaller and we could nuke the FIXME. That'd make it into a simple code cleanup. I'm sending right now for comments, before I forget about this simple cleanup.
I'll clean up and resend once Duy is done with his changes.
--- tree-diff.c | 2 +- tree-walk.h | 3 ++ tree.c | 77 ++++++++++++++++++---------------------------------------- 3 files changed, 28 insertions(+), 54 deletions(-)
tree-diff.c +1 -1
@@ -91,7 +91,7 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const* - zero for no * - negative for "no, and no subsequent entries will be either" */ -static int tree_entry_interesting (struct tree_desc *desc,const char *base,int baselen,struct diff_options *opt) +int tree_entry_interesting (struct tree_desc *desc,const char *base,int baselen,struct diff_options *opt) {const char *path;const unsigned char *sha1;
tree-walk.h +3 -0
@@ -60,4 +60,7 @@ static inline int traverse_path_len(const struct traverse_info *info, const stru return info->pathlen + tree_entry_len(n->path, n->sha1); } +struct diff_options ; +extern int tree_entry_interesting (struct tree_desc *desc,const char *base,int baselen,struct diff_options *opt); +#endif
tree.c +24 -53
101 lines not on this page · raw message
Signature · 1 line
1.7.3.rc0.1.g43ab