On Sat, Nov 28, 2015 at 11:35:43AM -0500, Jeff King wrote:
> On Sat, Nov 28, 2015 at 03:40:10PM +0000, brian m. carlson wrote:
> 
> > On Tue, Nov 24, 2015 at 08:07:23PM -0500, Jeff King wrote:
> > > What's cooking in git.git (Nov 2015, #04; Tue, 24)
> > > --------------------------------------------------
> > > [New Topics]
> > 
> > I noticed the object_id series was missing from this list.  Was there
> > something that needed fixing or a reroll?
> 
> Thanks for bringing this up; I meant to send a note but forgot.
> 
> I got a bunch of conflicts trying to merge it into 'next' and 'pu' and
> punted on it. I think the tricky bits are coming from
> dt/refs-backend-pre-vtable, where there was a lot of code movement.

I think as for merging into the latest pu, the thing you want to do in
refs.c is simply take what pu has.  You'll have to fix up one additional
struct object call site.  The same thing goes for builtin/merge.c and
builtin/branch.c, where the code I changed has since been eliminated.

I also noticed that merge-recursive.c and builtin/ff-refs.c needed some
minor fixups as well, but a quick compile will show you where those are.
I've included a diff for those two below.

-----%<-----
diff --git a/builtin/ff-refs.c b/builtin/ff-refs.c
index ae68cfbc..c9d37092 100644
--- a/builtin/ff-refs.c
+++ b/builtin/ff-refs.c
@@ -84,19 +84,19 @@ static void do_ref_update(struct ff_ref_data *data, struct 
ff_ref_details *detai
                set_git_dir(details->wt->git_dir);
                read_index(&the_index);
 
-               if (checkout_fast_forward(details->branch_commit->object.sha1,
-                               details->upstream_commit->object.sha1, 1))
+               if 
(checkout_fast_forward(details->branch_commit->object.oid.hash,
+                               details->upstream_commit->object.oid.hash, 1))
                        details->result_type = NON_FAST_FORWARD;
-               else if (update_ref("ff-refs", refname, 
details->upstream_commit->object.sha1,
-                               details->branch_commit->object.sha1, 0, 
UPDATE_REFS_QUIET_ON_ERR)) {
+               else if (update_ref("ff-refs", refname, 
details->upstream_commit->object.oid.hash,
+                               details->branch_commit->object.oid.hash, 0, 
UPDATE_REFS_QUIET_ON_ERR)) {
                        details->result_type = UNABLE_TO_UPDATE;
                        run_hook_le(NULL, "post-merge", "0", NULL);
                }
                discard_index(&the_index);
                chdir(path.buf);
                strbuf_release(&path);
-       } else if (update_ref("ff-refs", refname, 
details->upstream_commit->object.sha1,
-                       details->branch_commit->object.sha1, 0, 
UPDATE_REFS_QUIET_ON_ERR))
+       } else if (update_ref("ff-refs", refname, 
details->upstream_commit->object.oid.hash,
+                       details->branch_commit->object.oid.hash, 0, 
UPDATE_REFS_QUIET_ON_ERR))
                details->result_type = UNABLE_TO_UPDATE;
 }
 
@@ -207,7 +207,7 @@ static int analize_refs(const char *refname,
                                        details->upstream_commit);
                        details->merge_base = bases->item;
 
-                       if (!hashcmp(upstream_hash, 
details->merge_base->object.sha1))
+                       if (!hashcmp(upstream_hash, 
details->merge_base->object.oid.hash))
                                details->result_type = UP_TO_DATE;
 
                        else if (!in_merge_bases(details->branch_commit, 
details->upstream_commit))
diff --git a/merge-recursive.c b/merge-recursive.c
index 09d99640..50a16ebf 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1835,8 +1835,8 @@ int merge_trees(struct merge_options *o,
        if (code != 0) {
                if (o->gently)
                        return error(_("merging of trees %s and %s failed"),
-                           sha1_to_hex(head->object.sha1),
-                           sha1_to_hex(merge->object.sha1));
+                           oid_to_hex(&head->object.oid),
+                           oid_to_hex(&merge->object.oid));
 
                if (show(o, 4) || o->call_depth)
                        die(_("merging of trees %s and %s failed"),
-----%<-----
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: PGP signature

Reply via email to