diff options
Diffstat (limited to 'fast-import.c')
-rw-r--r-- | fast-import.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fast-import.c b/fast-import.c index 49516d60e6..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; } @@ -2952,7 +2952,7 @@ static void parse_reset_branch(const char *arg) static void cat_blob_write(const char *buf, unsigned long size) { - if (write_in_full(cat_blob_fd, buf, size) != size) + if (write_in_full(cat_blob_fd, buf, size) < 0) die_errno("Write to frontend failed"); } @@ -3189,10 +3189,10 @@ static void checkpoint(void) checkpoint_requested = 0; if (object_count) { cycle_packfile(); - dump_branches(); - dump_tags(); - dump_marks(); } + dump_branches(); + dump_tags(); + dump_marks(); } static void parse_checkpoint(void) |