[PATCH] Add comments to update_tree_entry()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Andy Parkins <andyparkins@xxxxxxxxx>
---
 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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]