diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2015-03-13 23:39:32 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-13 22:43:13 -0700 |
commit | fa33c3aae238c683b2b15989b9d7f88df19fa93d (patch) | |
tree | f717a6b65ea838d7fdc914d3d8b09b2f5741ee3b /bulk-checkin.c | |
parent | aeecdcd4c1c1a380e45aecadd8042a6a90ee3a20 (diff) | |
download | git-fa33c3aae238c683b2b15989b9d7f88df19fa93d.tar.gz |
bulk-checkin.c: convert to use struct object_id
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bulk-checkin.c')
-rw-r--r-- | bulk-checkin.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bulk-checkin.c b/bulk-checkin.c index 0c4b8a7cad..c80e503728 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -24,7 +24,7 @@ static struct bulk_checkin_state { static void finish_bulk_checkin(struct bulk_checkin_state *state) { - unsigned char sha1[20]; + struct object_id oid; struct strbuf packname = STRBUF_INIT; int i; @@ -36,11 +36,11 @@ static void finish_bulk_checkin(struct bulk_checkin_state *state) unlink(state->pack_tmp_name); goto clear_exit; } else if (state->nr_written == 1) { - sha1close(state->f, sha1, CSUM_FSYNC); + sha1close(state->f, oid.hash, CSUM_FSYNC); } else { - int fd = sha1close(state->f, sha1, 0); - fixup_pack_header_footer(fd, sha1, state->pack_tmp_name, - state->nr_written, sha1, + int fd = sha1close(state->f, oid.hash, 0); + fixup_pack_header_footer(fd, oid.hash, state->pack_tmp_name, + state->nr_written, oid.hash, state->offset); close(fd); } @@ -48,7 +48,7 @@ static void finish_bulk_checkin(struct bulk_checkin_state *state) strbuf_addf(&packname, "%s/pack/pack-", get_object_directory()); finish_tmp_packfile(&packname, state->pack_tmp_name, state->written, state->nr_written, - &state->pack_idx_opts, sha1); + &state->pack_idx_opts, oid.hash); for (i = 0; i < state->nr_written; i++) free(state->written[i]); |