All of lore.kernel.org
 help / color / mirror / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git List <git@vger.kernel.org>, Michael Haggerty <mhagger@alum.mit.edu>
Subject: Re: [PATCH 1/3] refs: make sha1 output parameter of refs_resolve_ref_unsafe() optional
Date: Sun, 24 Sep 2017 14:39:40 +0200	[thread overview]
Message-ID: <047033a6-1e3d-103e-a406-cc89447f4327@web.de> (raw)
In-Reply-To: <xmqq60c8j38t.fsf@gitster.mtv.corp.google.com>

Am 24.09.2017 um 03:26 schrieb Junio C Hamano:
> I wonder if we want a dedicated helper for them (perhaps about a
> dozen callers we have that fall into this pattern?) to call for the
> exact purpose, implemented as a thin-wrapper around the
> resolve_ref_unsafe() function, though.

refs_resolve_ref_unsafe() effectively has seven wrappers already:

	resolve_ref_unsafe()
	refs_resolve_refdup()
	resolve_refdup()
	refs_read_ref_full()
	read_ref_full()
	read_ref()

	ref_exists()

The last one already supplies a dummy SHA1 buffer; for a handful of
the others we could add and use variants that do the same.  I feel
that this API would become a bit crowded, though.

René

  reply	other threads:[~2017-09-24 12:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-23  9:41 [PATCH 1/3] refs: make sha1 output parameter of refs_resolve_ref_unsafe() optional René Scharfe
2017-09-23  9:44 ` [PATCH 2/3] refs: pass NULL to refs_resolve_ref_unsafe() if hash is not needed René Scharfe
2017-09-23  9:45 ` [PATCH 3/3] refs: pass NULL to resolve_ref_unsafe() " René Scharfe
2017-09-24  1:26 ` [PATCH 1/3] refs: make sha1 output parameter of refs_resolve_ref_unsafe() optional Junio C Hamano
2017-09-24 12:39   ` René Scharfe [this message]
2017-10-01  7:28 ` [PATCH 4/3] refs: pass NULL to refs_resolve_refdup() if hash is not needed René Scharfe
2017-10-01  7:29 ` [PATCH 5/3] refs: pass NULL to resolve_refdup() " René Scharfe
2017-10-01  8:29   ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=047033a6-1e3d-103e-a406-cc89447f4327@web.de \
    --to=l.s.r@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mhagger@alum.mit.edu \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.