git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Shourya Shukla <shouryashukla.oo@gmail.com>
Cc: git@vger.kernel.org, peff@peff.net, jnareb@gmail.com,
	christian.couder@gmail.com
Subject: Re: [RFC]rev-parse: rev-parse.h does not exist for rev-parse.c
Date: Sat, 21 Mar 2020 12:41:56 -0700	[thread overview]
Message-ID: <xmqqy2rt8ph7.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200321183545.GA17453@konoha> (Shourya Shukla's message of "Sun, 22 Mar 2020 00:05:45 +0530")

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.

      reply	other threads:[~2020-03-21 19:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21 18:35 [RFC]rev-parse: rev-parse.h does not exist for rev-parse.c Shourya Shukla
2020-03-21 19:41 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqy2rt8ph7.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=peff@peff.net \
    --cc=shouryashukla.oo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).