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

Re: [PATCH v3] rerere: Expose an API corresponding to 'clear' functionality

From
Junio C Hamano <gitster@pobox.com>
Date
May 6, 2011, 16:51 UTC
Message-ID
<7vr58b22ny.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1304663813-27724-1-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 9 quoted lines
> Libify the "rerere clear" into a simple function called rerere_clear
> that takes no arguments, and returns the exit status.  Also export
> unlink_rr_item as unlink_rerere_item so rerere_clear and the
> un-libified "git rerere gc" can both use it.
>
> Helped-by: Jonathan Nieder <jrnieder@gmail.com>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  What changed since v2: Jonathan's review.
Are you sure this is the version you wanted to send?

You now return -1 from rerere_clear() when setup_rerere() says that the feature is not enabled, and this is propagated back to cmd_rerere(), causing the whole command to report a failure in its exit status, which seems to me a grave regression. Your previous round got this part right, but it is broken in this round.

Also I seem to recall that Jonathan suggested that you do not have to expose unlink_rr_item() as an external symbol if you moved the garbage collection part from builtin/rerere.c to rerere.c but I do not see such a change in this patch. I think the gc interface is a lot more reasonable API to expose to external callers ("git gc" may want to make an internal call to rerere_gc() moved to rerere.c, instead of spawning "git rerere gc" as an external command) than unlink_rerere_item() that is only useful for callers that are deep inside rerere specific codepath.

What is going on?
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 6 of 13 in “rerere: Expose an API corresponding to 'clear' functionality”
  1. rerere: Expose an API corresponding to 'clear' functionalityRamkumar Ramachandra, Apr 11, 2011
  2. Junio C HamanoApr 11, 2011
  3. rerere: Expose an API corresponding to 'clear' functionalityRamkumar Ramachandra, Apr 13, 2011
  4. Jonathan NiederApr 13, 2011
  5. rerere: Expose an API corresponding to 'clear' functionalityRamkumar Ramachandra, May 6, 2011
  6. Junio C HamanoMay 6, 2011
  7. Ramkumar RamachandraMay 7, 2011
  8. 0/2 Libify rerere: clear and gcRamkumar Ramachandra, May 8, 2011
  9. 1/2 usage: Introduce error_errno corresponding to die_errnoRamkumar Ramachandra, May 8, 2011
  10. Ramkumar RamachandraMay 8, 2011
  11. Junio C HamanoMay 8, 2011
  12. 2/2 rerere: Libify "rerere clear" and "rerere gc"Ramkumar Ramachandra, May 8, 2011
  13. Junio C HamanoMay 8, 2011

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.