From: Derrick Stolee <dstolee@microsoft.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Cc: "sbeller@google.com" <sbeller@google.com>,
"mhagger@alum.mit.edu" <mhagger@alum.mit.edu>,
Derrick Stolee <dstolee@microsoft.com>
Subject: [PATCH] TO-SQUASH: replace the_repository with arbitrary r
Date: Wed, 18 Jul 2018 13:40:38 +0000 [thread overview]
Message-ID: <20180718134026.243823-1-dstolee@microsoft.com> (raw)
In-Reply-To: <20180717224935.96397-3-sbeller@google.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
This should just be squashed into PATCH 2.
builtin/replace.c | 5 ++---
replace-object.c | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/builtin/replace.c b/builtin/replace.c
index 5f34659071..d0b1cdb061 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -57,9 +57,8 @@ static int show_reference(struct repository *r, const char *refname,
if (get_oid(refname, &object))
return error("Failed to resolve '%s' as a valid ref.", refname);
- obj_type = oid_object_info(the_repository, &object,
- NULL);
- repl_type = oid_object_info(the_repository, oid, NULL);
+ obj_type = oid_object_info(r, &object, NULL);
+ repl_type = oid_object_info(r, oid, NULL);
printf("%s (%s) -> %s (%s)\n", refname, type_name(obj_type),
oid_to_hex(oid), type_name(repl_type));
diff --git a/replace-object.c b/replace-object.c
index 01a5a59a35..017f02f8ef 100644
--- a/replace-object.c
+++ b/replace-object.c
@@ -26,7 +26,7 @@ static int register_replace_ref(struct repository *r,
oidcpy(&repl_obj->replacement, oid);
/* Register new object */
- if (oidmap_put(the_repository->objects->replace_map, repl_obj))
+ if (oidmap_put(r->objects->replace_map, repl_obj))
die("duplicate replace ref: %s", refname);
return 0;
--
2.18.0.118.gd4f65b8d14
prev parent reply other threads:[~2018-07-18 13:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 22:49 [PATCH 0/2] RFC ref store to repository migration Stefan Beller
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 ` Derrick Stolee [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=20180718134026.243823-1-dstolee@microsoft.com \
--to=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
--cc=sbeller@google.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).