git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: git@vger.kernel.org
Cc: mhagger@alum.mit.edu, Stefan Beller <sbeller@google.com>
Subject: [RFC PATCH 0/3] Migrate the refs API to take the repository argument
Date: Thu, 26 Jul 2018 17:36:37 -0700	[thread overview]
Message-ID: <20180727003640.16659-1-sbeller@google.com> (raw)

The second patch is the real API proposal.
Unlike the lookup_* series, which caused a lot of integration pain to Junio,
I plan to structure this in a different way, by having multiple steps:

 (1) in this (later to be non-RFC) series, add the new API that passes thru
     the repository; for now do not replace refs_store argument by
     struct repository.
 (2) the last patch is a demo of converting one of the callers over
     to the new API; this would need to be done for all of them
     
 (3) After some time do a cleanup series to remove callers of the
     old API fromly introduced series that are currently in flight.
 (4) Remove the old API.

 (5) Introduce the final API removing the refs_store
 (6) convert all callers to the final API, using this same dual step approach
 (7) remove this API
 
Steps 1,2 will be done in this series (2 is done only as demo here
for one function, but the non-RFC would do it all)

Steps 3,4 would be done once there are no more series in flight using
the old API.

Before continuing on step (2), I would want to ask for your thoughts
of (1).

Also note that after step (1) before (4) refs.h looks messy as well as
between (5) and (7).

Thanks,
Stefan


Stefan Beller (3):
  refs.c: migrate internal ref iteration to pass thru repository
    argument
  refs: introduce new API, wrap old API shallowly around new API
  replace: migrate to for_each_replace_repo_ref

 builtin/replace.c    |   9 +-
 refs.c               | 187 ++++++++++++++--------
 refs.h               | 362 ++++++++++++++++++++++++++++++++++++++-----
 refs/iterator.c      |   6 +-
 refs/refs-internal.h |   5 +-
 replace-object.c     |   7 +-
 6 files changed, 464 insertions(+), 112 deletions(-)

-- 
2.18.0.345.g5c9ce644c3-goog


             reply	other threads:[~2018-07-27  0:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  0:36 Stefan Beller [this message]
2018-07-27  0:36 ` [PATCH 1/3] refs.c: migrate internal ref iteration to pass thru repository argument 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           ` [PATCH 0/2] Cleanup refs API [WAS: Re: [PATCH 2/3] refs: introduce new API, wrap old API shallowly around new API] Stefan Beller
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

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

  git send-email \
    --in-reply-to=20180727003640.16659-1-sbeller@google.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --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 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 NNTP newsgroup(s).