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

Re: [PATCH 1/3] treewalk.c: Rename variable ret to cb_bits and remove some dead lines.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 19, 2013, 18:13 UTC
Message-ID
<7vli52wh8n.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1374183327-14939-1-git-send-email-stefanbeller@googlemail.com>

The "ret" was meant to mean "the return value we got from the callback function", not "the return value we would give our caller".

This rename is a bit misleading in that "cb_bits == -1" does not mean "full bits set", and it does not tell us much what these "bits" signify.

They are used to answer this question: which one of the trees in t[0..n] did the callback function consumed (hence needs their pointers updated).

So perhaps call it "trees_used" or something?

By the way, our log message usually do not Capitalize the subject after the "<area>:", i.e. do something like this instead:

    Subject: [PATCH 1/3] traverse_trees(): clarify return value of the callback
Thanks.
Previous: Stefan BellerNext: Stefan Beller
Message 5 of 8 in “treewalk.c: Rename variable ret to cb_bits and remove some dead lines.”
  1. 1/3 treewalk.c: Rename variable ret to cb_bits and remove some dead lines.Stefan Beller, Jul 18, 2013
  2. 2/3 http-push.c, add_send_request: Do not initialize transfer_request.Stefan Beller, Jul 18, 2013
  3. Junio C HamanoJul 19, 2013
  4. 3/3 apply, find_name_traditional: Do not initialize len to the lines length.Stefan Beller, Jul 18, 2013
  5. Junio C HamanoJul 19, 2013
  6. Stefan BellerJul 19, 2013
  7. traverse_trees(): clarify return value of the callback.Stefan Beller, Jul 19, 2013
  8. Junio C HamanoJul 19, 2013

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.