Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
push_refs_with_export: convert to struct object_id
author
brian m. carlson
<sandals@crustytoothpaste.net>
Tue, 10 Nov 2015 02:22:24 +0000
(
02:22
+0000)
committer
Jeff King
<peff@peff.net>
Fri, 20 Nov 2015 13:02:05 +0000
(08:02 -0500)
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
transport-helper.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
e96b16c
)
diff --git
a/transport-helper.c
b/transport-helper.c
index 91cb0e72ce66d32931aaad7cf8bd3c99f59e95bd..0eb3cf01aa1da857c7340805971e63305d73a6ea 100644
(file)
--- 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;
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);
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));
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);
}
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,
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;
if (!name || !(flag & REF_ISSYMREF))
name = ref->peer_ref->name;