git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: git@vger.kernel.org
Cc: "Jeff King" <peff@peff.net>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Michael Haggerty" <mhagger@alum.mit.edu>
Subject: [PATCH v3 07/13] push_refs_with_export: convert to struct object_id
Date: Fri,  9 Oct 2015 01:43:53 +0000	[thread overview]
Message-ID: <1444355039-186351-8-git-send-email-sandals@crustytoothpaste.net> (raw)
In-Reply-To: <1444355039-186351-1-git-send-email-sandals@crustytoothpaste.net>

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 transport-helper.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/transport-helper.c b/transport-helper.c
index 91cb0e72..0eb3cf01 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -878,13 +878,13 @@ static int push_refs_with_export(struct transport *transport,
 
 	for (ref = remote_refs; ref; ref = ref->next) {
 		char *private;
-		unsigned char sha1[20];
+		struct object_id oid;
 
 		private = apply_refspecs(data->refspecs, data->refspec_nr, ref->name);
-		if (private && !get_sha1(private, sha1)) {
+		if (private && !get_sha1(private, oid.hash)) {
 			strbuf_addf(&buf, "^%s", private);
 			string_list_append(&revlist_args, strbuf_detach(&buf, NULL));
-			hashcpy(ref->old_oid.hash, sha1);
+			oidcpy(&ref->old_oid, &oid);
 		}
 		free(private);
 
@@ -898,7 +898,7 @@ static int push_refs_with_export(struct transport *transport,
 					name = resolve_ref_unsafe(
 						 ref->peer_ref->name,
 						 RESOLVE_REF_READING,
-						 sha1, &flag);
+						 oid.hash, &flag);
 					if (!name || !(flag & REF_ISSYMREF))
 						name = ref->peer_ref->name;
 
-- 
2.6.1

  parent reply	other threads:[~2015-10-09  1:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09  1:43 [PATCH v3 00/13] object_id part 2 brian m. carlson
2015-10-09  1:43 ` [PATCH v3 01/13] refs: convert some internal functions to use object_id brian m. carlson
2015-10-13 11:43   ` Michael Haggerty
2015-10-14  2:50     ` brian m. carlson
2015-10-09  1:43 ` [PATCH v3 02/13] sha1_file: introduce has_object_file helper brian m. carlson
2015-10-09  1:43 ` [PATCH v3 03/13] Convert struct ref to use object_id brian m. carlson
2015-10-09  1:43 ` [PATCH v3 04/13] add_sought_entry_mem: convert to struct object_id brian m. carlson
2015-10-09  1:43 ` [PATCH v3 05/13] parse_fetch: convert to use " brian m. carlson
2015-10-09  1:43 ` [PATCH v3 06/13] get_remote_heads: convert to " brian m. carlson
2015-10-09  1:43 ` brian m. carlson [this message]
2015-10-09  1:43 ` [PATCH v3 08/13] ref_newer: convert to use " brian m. carlson
2015-10-09  1:43 ` [PATCH v3 09/13] object: introduce get_object_hash macro brian m. carlson
2015-10-09  1:43 ` [PATCH v3 10/13] Add several uses of get_object_hash brian m. carlson
2015-10-09  1:43 ` [PATCH v3 11/13] Convert struct object to object_id brian m. carlson
2015-10-09  1:43 ` [PATCH v3 12/13] Remove get_object_hash brian m. carlson
2015-10-09  1:43 ` [PATCH v3 13/13] remote: convert functions to struct object_id brian m. carlson

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=1444355039-186351-8-git-send-email-sandals@crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    --cc=pclouds@gmail.com \
    --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.
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).