git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] technical-docs: document tree-walking API

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2009, 08:25 UTC
Message-ID
<7vtz0vyjz2.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1248844995-13769-1-git-send-email-bebarino@gmail.com>
Stephen Boyd <bebarino@gmail.com> writes:
Show 5 quoted lines
> Some things to get you started:
>
>       - the traversal callback mask parameter
> 	- a better general usage description at the top
> 	- add an authors section?
Thanks.
> diff --git a/Documentation/technical/api-tree-walking.txt b/Documentation/technical/api-tree-walking.txt
> index e3ddf91..baa382d 100644
> +* `mask` has its nth bit set if the nth tree's entry is valid. (or different?)

nth bit is set when something exists in that tree at the path (entry[nth] could be either a file (regular or symlink) or a directory).

> +* `dirmask` has its nth bit set if the nth tree's entry is a directory.
Correct.
Show 9 quoted lines
> +* `entry` is an array of size `n` where the nth entry is from the nth tree.
> +
> +* `info` maintains the state of the traversal.
> +
> ++
> +Returning a negative value will terminate the traversal. Otherwise the
> +return value is treated as an update mask. If the nth bit is set the nth tree
> +will be updated and if the bit is not set the nth tree entry will be the
> +same in the next callback invocation.
Correct.
Previous: Stephen Boyd
Message 2 of 2 in “technical-docs: document tree-walking API”
  1. technical-docs: document tree-walking APIStephen Boyd, Jul 29, 2009
  2. Junio C HamanoJul 29, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.