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

Re: [RFC]rev-parse: rev-parse.h does not exist for rev-parse.c

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 21, 2020, 19:41 UTC
Message-ID
<xmqqy2rt8ph7.fsf@gitster.c.googlers.com>
In-Reply-To
<20200321183545.GA17453@konoha>
Shourya Shukla <shouryashukla.oo@gmail.com> writes:
> using 'argv_array_pushl()', I thought maybe I could call 'rev-parse.h'
> and use the 'cmd_rev_parse()' function directly.

Never call cmd_foo() from within your program for any value of foo(), as it is not part of the approved API. cmd_foo() is meant to be the entry point of "run once and exit" function, it is not just allowed but is expected to exit, and it also will do the in-core repository setup etc.

Previous: Shourya Shukla
Message 2 of 2 in “[RFC]rev-parse: rev-parse.h does not exist for rev-parse.c”
  1. Shourya ShuklaMar 21, 2020
  2. Junio C HamanoMar 21, 2020

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.