diff options
author | Elijah Newren <newren@gmail.com> | 2010-08-26 00:21:46 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-26 09:53:35 -0700 |
commit | b6b987a09457e9c8d49aad9170df32b1f607c5b9 (patch) | |
tree | c746f157d14f1d10612de5845eca6bc8970949d0 | |
parent | d599e0484f8ebac8cc50e9557a4c3d246826843d (diff) | |
download | git-b6b987a09457e9c8d49aad9170df32b1f607c5b9.tar.gz |
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 <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | tree-diff.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tree-diff.c b/tree-diff.c index fe9f52c479..4d85fef5d0 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 |