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

Re: [RFC 3/3] Alternates API: Remove unused parameter

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 30, 2011, 22:46 UTC
Message-ID
<7vsju4kz0c.fsf@alter.siamese.dyndns.org>
In-Reply-To
<3c357acd119aa836f6cd3298d62cc5098f4c053c.1301521244.git.mfwitten@gmail.com>
Curious; why are your recent patch series all have screwed-up threading?
Here is an earlier one:
 [ 120: Michael Witten         ] [PATCH 4/4] Clean: Remove useless parameters from both get_commit_info() functions
  [  16: Michael Witten         ] [PATCH 0/4] Miscellaneous Improvements
  [  51: Michael Witten         ] [PATCH 1/4] Typos: t/README
  [  56: Michael Witten         ] [PATCH 2/4] Clean: Remove superfluous strbuf 'docs'
  [  21: Michael Witten         ] [PATCH 3/4] Clean: Remove unnecessary `\' (line continuation)
and this series looks like this:
 [  63: Michael Witten         ] [RFC 3/3] Alternates API: Remove unused parameter
  [  16: Michael Witten         ] [RFC 0/3] Alternates API
  [ 152: Michael Witten         ] [RFC 1/3] Alternates API: Untangle the interface
  [  99: Michael Witten         ] [RFC 2/3] Alternates API: Improve naming

Did we break git-send-email recently? I would personally be worried more about that than the alternates callbacks.

Having said all that, I didn't like refs_from_alternate_cb interface myself. I should probably have done for_each_ref_in_alternates() that takes two callback functions, one that decides if it wants to deal with an alternate repository given the path to it, and the other that is fed the refs from the alternate. Both callback functions should take the usual "void *cb_data" in addition, of course.

IOW, something like...
	typedef int (*skip_alternate_fn)(const char *, void *);
	int for_each_ref_in_alternates(each_ref_fn ref_fn,
        			skip_alternate_fn skip_fn,
                                void *cb_data);
Previous: Michael Witten
Message 12 of 12 in “[RFC 1/2] Portability: Convert strictly between function pointers”
  1. Michael WittenMar 29, 2011
  2. 2/2 Future Proofing: Pass around pointers to either functions or dataMichael Witten, Mar 29, 2011
  3. Erik Faye-LundMar 30, 2011
  4. Michael WittenMar 30, 2011
  5. Junio C HamanoMar 30, 2011
  6. 1/3 Alternates API: Untangle the interfaceMichael Witten, Mar 30, 2011
  7. Junio C HamanoMar 30, 2011
  8. 2/3 Alternates API: Improve namingMichael Witten, Mar 30, 2011
  9. Junio C HamanoMar 30, 2011
  10. 3/3 Alternates API: Remove unused parameterMichael Witten, Mar 30, 2011
  11. 0/3 Alternates APIMichael Witten, Mar 30, 2011
  12. Junio C HamanoMar 30, 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.