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

Re: [PATCH 1/4] add generic, type aware object chain walker

From
MKMartin Koegler <mkoegler@auto.tuwien.ac.at>
Date
Feb 25, 2008, 08:21 UTC
Message-ID
<20080225082145.GB20048@auto.tuwien.ac.at>
In-Reply-To
<7vskzhmppo.fsf@gitster.siamese.dyndns.org>
On Sun, Feb 24, 2008 at 11:59:15PM -0800, Junio C Hamano wrote:
Show 8 quoted lines
> mkoegler@auto.tuwien.ac.at (Martin Koegler) writes:
> > How should I define the return value of fsck_walk in the presence of
> > multiple errors?
> 
> Returning error is fine.  That is not what I was talking about.
> 
> I was talking about an early return in the code, that does not
> callback once you find an error.
That is not what I was talking about. 

We need to define the return code of fsck_walk in the case of multiple errors. What error (of all possible) should it return?

What about this new behaviour:
Callback return values:
* 0 everything OK
* > 0 error, but continue
* < 0 error, but stop
The return value of fsck_walk would be:
* -1, if fsck_walk discoveres an error (eg. not parseable object)
* first callback return value < 0 (and stops further processing in this case)
* first callback return value > 0 (if not callback return value < 0)
* 0, if no errors are discovered
mfg Martin Kögler
Previous: Junio C HamanoNext: Shawn O. Pearce
Message 18 of 19 in “add generic, type aware object chain walker”
  1. 1/4 add generic, type aware object chain walkerMartin Koegler, Feb 24, 2008
  2. 2/4 builtin-fsck: move away from object-refsMartin Koegler, Feb 24, 2008
  3. 3/4 Remove unused object-ref codeMartin Koegler, Feb 24, 2008
  4. 4/4 builtin-fsck: reports missing parent commitsMartin Koegler, Feb 24, 2008
  5. Shawn O. PearceFeb 25, 2008
  6. Martin KoeglerFeb 25, 2008
  7. Junio C HamanoFeb 25, 2008
  8. Martin KoeglerFeb 25, 2008
  9. Junio C HamanoFeb 25, 2008
  10. Martin KoeglerFeb 25, 2008
  11. Shawn O. PearceFeb 25, 2008
  12. Nicolas PitreFeb 25, 2008
  13. Shawn O. PearceFeb 25, 2008
  14. Nicolas PitreFeb 25, 2008
  15. Junio C HamanoFeb 25, 2008
  16. Martin KoeglerFeb 25, 2008
  17. Junio C HamanoFeb 25, 2008
  18. Martin KoeglerFeb 25, 2008
  19. Shawn O. PearceFeb 25, 2008

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.