Signed-off-by: Andy Parkins <redacted>
---
tree-walk.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/tree-walk.c b/tree-walk.c
index 14cc5ae..5363366 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -37,6 +37,11 @@ static void entry_extract(struct tree_desc *t, struct name_entry *a)
void update_tree_entry(struct tree_desc *desc)
{
+ /* Each tree is represented by a buffer containing hashes followed
+ * by space followed by filename; separated with NUL. To move to the
+ * next entry we simply move forward by strlen() (which skips the filename)
+ * then skip the hash and the space. */
+ /* This function should really be called skip_tree_entry() */
const void *buf = desc->buf;
unsigned long size = desc->size;
int len = strlen(buf) + 1 + 20;--
1.4.4.1.geeee8