summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-06 14:24:27 +0900
committerJunio C Hamano <gitster@pobox.com>2017-11-06 14:24:27 +0900
commite7e456f5007f30997e48dec57a1fc09b6b0f071e (patch)
tree47ce2904980d9e233ea416e5cd05be032946c345 /fast-import.c
parentf4c214b529336124f8642f1373cd4a549d5e7743 (diff)
parent4f01e5080c4a7eee69da47c958888358e6127584 (diff)
downloadgit-e7e456f5007f30997e48dec57a1fc09b6b0f071e.tar.gz
Merge branch 'bc/object-id'
Conversion from uchar[20] to struct object_id continues. * bc/object-id: (25 commits) refs/files-backend: convert static functions to object_id refs: convert read_raw_ref backends to struct object_id refs: convert peel_object to struct object_id refs: convert resolve_ref_unsafe to struct object_id worktree: convert struct worktree to object_id refs: convert resolve_gitlink_ref to struct object_id Convert remaining callers of resolve_gitlink_ref to object_id sha1_file: convert index_path and index_fd to struct object_id refs: convert reflog_expire parameter to struct object_id refs: convert read_ref_at to struct object_id refs: convert peel_ref to struct object_id builtin/pack-objects: convert to struct object_id pack-bitmap: convert traverse_bitmap_commit_list to object_id refs: convert dwim_log to struct object_id builtin/reflog: convert remaining unsigned char uses to object_id refs: convert dwim_ref and expand_ref to struct object_id refs: convert read_ref and read_ref_full to object_id refs: convert resolve_refdup and refs_resolve_refdup to struct object_id Convert check_connected to use struct object_id refs: update ref transactions to use struct object_id ...
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fast-import.c b/fast-import.c
index d5e4cf0bad..b70ac025e0 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -1758,7 +1758,7 @@ static int update_branch(struct branch *b)
delete_ref(NULL, b->name, NULL, 0);
return 0;
}
- if (read_ref(b->name, old_oid.hash))
+ if (read_ref(b->name, &old_oid))
oidclr(&old_oid);
if (!force_update && !is_null_oid(&old_oid)) {
struct commit *old_cmit, *new_cmit;
@@ -1778,7 +1778,7 @@ static int update_branch(struct branch *b)
}
transaction = ref_transaction_begin(&err);
if (!transaction ||
- ref_transaction_update(transaction, b->name, b->oid.hash, old_oid.hash,
+ ref_transaction_update(transaction, b->name, &b->oid, &old_oid,
0, msg, &err) ||
ref_transaction_commit(transaction, &err)) {
ref_transaction_free(transaction);
@@ -1820,7 +1820,7 @@ static void dump_tags(void)
strbuf_addf(&ref_name, "refs/tags/%s", t->name);
if (ref_transaction_update(transaction, ref_name.buf,
- t->oid.hash, NULL, 0, msg, &err)) {
+ &t->oid, NULL, 0, msg, &err)) {
failure |= error("%s", err.buf);
goto cleanup;
}