git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: pclouds@gmail.com
Cc: bmwill@google.com, git@vger.kernel.org, mhagger@alum.mit.edu,
	sbeller@google.com, stolee@gmail.com, dstolee@microsoft.com
Subject: [PATCH 0/2] Cleanup refs API [WAS: Re: [PATCH 2/3] refs: introduce new API, wrap old API shallowly around new API]
Date: Mon, 30 Jul 2018 12:47:29 -0700	[thread overview]
Message-ID: <20180730194731.220191-1-sbeller@google.com> (raw)
In-Reply-To: <CACsJy8Cx7u5YtK6sPJ=HbAOUBXCrP7VOgMyoQ58SB6q_s4N7Gg@mail.gmail.com>

> > I anticipate that we need to have a lot of back pointers to the repository
> > in question, hence I think we should have the repository pointer promoted
> > to not just a back pointer.
>
> I will probably need more time to study that commit and maybe the mail
> archive for the history of this series. But if I remember correctly
> some of these for_each_ api is quite a pain (perhaps it's the for_each
> version of reflog?) and it's probably better to redesign it (again
> talking without real understanding of the problem).

I stepped back a bit and reconsidered the point made above, and I do not
think that the repository argument is any special. If you need a repository
(for e.g. lookup_commit or friends), you'll have to pass it through the
callback cookie, whether directly or as part of a struct tailored to
your purpose.

Instead we should strive to make the refs API smaller and cleaner,
omitting the repository argument at all, and instead should be focussing
on a ref_store argument instead.

This series applies on master; when we decide to go this direction
we can drop origin/sb/refs-in-repo.

Thanks,
Stefan

Derrick Stolee (1):
  replace-objects: use arbitrary repositories

Stefan Beller (1):
  refs: switch for_each_replace_ref back to use a ref_store

 builtin/replace.c | 4 +---
 refs.c            | 4 ++--
 refs.h            | 2 +-
 replace-object.c  | 5 +++--
 4 files changed, 7 insertions(+), 8 deletions(-)

-- 
2.18.0.132.g195c49a2227


  reply	other threads:[~2018-07-30 19:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  0:36 [RFC PATCH 0/3] Migrate the refs API to take the repository argument Stefan Beller
2018-07-27  0:36 ` [PATCH 1/3] refs.c: migrate internal ref iteration to pass thru " Stefan Beller
2018-07-27  0:36 ` [PATCH 2/3] refs: introduce new API, wrap old API shallowly around new API Stefan Beller
2018-07-27 16:07   ` Duy Nguyen
2018-07-27 17:19     ` Brandon Williams
2018-07-27 17:30       ` Stefan Beller
2018-07-27 18:04         ` Duy Nguyen
2018-07-30 19:47           ` Stefan Beller [this message]
2018-07-30 19:47             ` [PATCH 1/2] replace-objects: use arbitrary repositories Stefan Beller
2018-07-30 19:47             ` [PATCH 2/2] refs: switch for_each_replace_ref back to use a ref_store Stefan Beller
2018-07-31  0:18               ` Jonathan Tan
2018-07-31  0:41                 ` Stefan Beller
2018-07-31 16:17                   ` Duy Nguyen
2018-07-27  0:36 ` [PATCH 3/3] replace: migrate to for_each_replace_repo_ref Stefan Beller

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=20180730194731.220191-1-sbeller@google.com \
    --to=sbeller@google.com \
    --cc=bmwill@google.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    --cc=pclouds@gmail.com \
    --cc=stolee@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).