From: Stefan Beller <sbeller@google.com>
To: dstolee@microsoft.com, stolee@gmail.com
Cc: git@vger.kernel.org, mhagger@alum.mit.edu,
Stefan Beller <sbeller@google.com>
Subject: [PATCH 0/2] RFC ref store to repository migration
Date: Tue, 17 Jul 2018 15:49:33 -0700 [thread overview]
Message-ID: <20180717224935.96397-1-sbeller@google.com> (raw)
Stolee said (privately):
I also ran into an issue where some of the "arbitrary repository"
patches don't fully connect. Jonathan's test demonstrated this
issue when I connected some things in an in-process patch
Work in progress: https://github.com/gitgitgadget/git/pull/11
Specifically: https://github.com/gitgitgadget/git/pull/11/commits/287ec6c1cd4bf4da76c05698373aee15749d011a
And I dislike the approach taken in
https://github.com/gitgitgadget/git/pull/11/commits/287ec6c1cd4bf4da76c05698373aee15749d011a
and would prefer another approach shown at
https://github.com/stefanbeller/git/tree/object-store-convert-refstore-partial
or in this series.
This approach doesn't have the ugliness of having the repository around twice,
e.g.
int register_replace_ref(const char *refname, ...
{
struct repository *r = cb_data;
...
}
...
for_each_replace_ref(r, register_replace_ref, r);
which would iterate over the refs of the first "r" and have "r" as a call back
data point for register_replace_ref.
This approach also takes the gentle hint of Junio to not replace well used functions
throughout the whole code base (using coccinelle), but for now exposes just
one example in the second patch.
These patches have been developed on top of jt/commit-graph-per-object-store.
Opinions?
Thanks,
Stefan
Stefan Beller (2):
refs.c: migrate internal ref iteration to pass thru repository
argument
refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback
builtin/replace.c | 3 ++-
refs.c | 48 +++++++++++++++++++++++++++++++++++++-------
refs.h | 12 ++++++++++-
refs/iterator.c | 6 +++---
refs/refs-internal.h | 5 +++--
replace-object.c | 3 ++-
6 files changed, 62 insertions(+), 15 deletions(-)
--
2.18.0.233.g985f88cf7e-goog
next reply other threads:[~2018-07-17 22:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 22:49 Stefan Beller [this message]
2018-07-17 22:49 ` [PATCH 1/2] refs.c: migrate internal ref iteration to pass thru repository argument Stefan Beller
2018-07-17 22:49 ` [PATCH 2/2] refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback Stefan Beller
2018-07-18 10:58 ` Derrick Stolee
2018-07-18 17:07 ` Stefan Beller
2018-07-18 13:40 ` [PATCH] TO-SQUASH: replace the_repository with arbitrary r Derrick Stolee
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=20180717224935.96397-1-sbeller@google.com \
--to=sbeller@google.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
--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).