git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: What's cooking in git.git (Nov 2015, #04; Tue, 24)
Date: Sat, 28 Nov 2015 17:09:32 +0000	[thread overview]
Message-ID: <20151128170932.GC15706@vauxhall.crustytoothpaste.net> (raw)
In-Reply-To: <20151128163543.GA26759@sigill.intra.peff.net>

[-- Attachment #1: Type: text/plain, Size: 3891 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2015-11-28 17:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25  1:07 What's cooking in git.git (Nov 2015, #04; Tue, 24) Jeff King
2015-11-25 10:13 ` John Keeping
2015-11-25 10:15   ` Jeff King
2015-11-28 15:40 ` brian m. carlson
2015-11-28 16:35   ` Jeff King
2015-11-28 17:09     ` brian m. carlson [this message]
2015-12-01 23:10       ` Jeff King

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=20151128170932.GC15706@vauxhall.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).