author | Linus Torvalds <torvalds@linux-foundation.org> | |
Thu, 6 Mar 2008 02:59:29 +0000 (18:59 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 9 Mar 2008 08:43:47 +0000 (00:43 -0800) | ||
commit | 40d934df72eaf244c826d5c26da0896ce7185cb6 | |
tree | ee461fff98614c9a4593f16944a2ff0b05d00a78 | tree | snapshot |
parent | 0ab9e1e8cdaefdd33bf24bb0be0ec766483f8bbe | commit | diff |
Make 'traverse_tree()' use linked structure rather than 'const char *base'
This makes the calling convention a bit less obvious, but a lot more
flexible. Instead of allocating and extending a new 'base' string, we
just link the top-most name into a linked list of the 'info' structure
when traversing a subdirectory, and we can generate the basename by
following the list.
Perhaps even more importantly, the linked list of info structures also
gives us a place to naturally save off other information than just the
directory name.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This makes the calling convention a bit less obvious, but a lot more
flexible. Instead of allocating and extending a new 'base' string, we
just link the top-most name into a linked list of the 'info' structure
when traversing a subdirectory, and we can generate the basename by
following the list.
Perhaps even more importantly, the linked list of info structures also
gives us a place to naturally save off other information than just the
directory name.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-tree.c | diff | blob | history | |
tree-walk.c | diff | blob | history | |
tree-walk.h | diff | blob | history |