From: Andy Parkins Date: Mon, 11 Dec 2006 22:13:11 GMT Subject: [PATCH] Add comments to update_tree_entry() Message-ID: <200612112213.11829.andyparkins@gmail.com> In-Reply-To: Signed-off-by: Andy Parkins --- 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