From: Elijah Newren Date: Thu, 26 Aug 2010 06:21:46 +0000 (-0600) Subject: Document pre-condition for tree_entry_interesting X-Git-Tag: v1.7.4-rc0~171^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b6b987a09457e9c8d49aad9170df32b1f607c5b9;p=git.git Document pre-condition for tree_entry_interesting tree_entry_interesting will fail to find appropriate matches if the base directory path is not terminated with a slash. Knowing this earlier would have saved me some debugging time. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- diff --git a/tree-diff.c b/tree-diff.c index fe9f52c47..4d85fef5d 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -85,6 +85,8 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const /* * Is a tree entry interesting given the pathspec we have? * + * Pre-condition: baselen == 0 || base[baselen-1] == '/' + * * Return: * - 2 for "yes, and all subsequent entries will be" * - 1 for yes