summaryrefslogtreecommitdiff
path: root/pack-bitmap-write.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-12 14:31:41 -0800
committerJunio C Hamano <gitster@pobox.com>2014-12-12 14:31:42 -0800
commit3889e7a60c65031f0c5381d8060cefb4294d932e (patch)
treef63aa1e6a391e3fede0821e003b257ddfc721a2c /pack-bitmap-write.c
parent23c0956441a101b2e8eca7e063e71bdc69a0c415 (diff)
parentb5007211b6582fc38647ff695b5ac51541ea9de8 (diff)
downloadgit-3889e7a60c65031f0c5381d8060cefb4294d932e.tar.gz
Merge branch 'jk/pack-bitmap'
* jk/pack-bitmap: pack-bitmap: do not use gcc packed attribute
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r--pack-bitmap-write.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 8029ae3561..c05d1386af 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -472,7 +472,6 @@ static void write_selected_commits_v1(struct sha1file *f,
for (i = 0; i < writer.selected_nr; ++i) {
struct bitmapped_commit *stored = &writer.selected[i];
- struct bitmap_disk_entry on_disk;
int commit_pos =
sha1_pos(stored->commit->object.sha1, index, index_nr, sha1_access);
@@ -480,11 +479,10 @@ static void write_selected_commits_v1(struct sha1file *f,
if (commit_pos < 0)
die("BUG: trying to write commit not in index");
- on_disk.object_pos = htonl(commit_pos);
- on_disk.xor_offset = stored->xor_offset;
- on_disk.flags = stored->flags;
+ sha1write_be32(f, commit_pos);
+ sha1write_u8(f, stored->xor_offset);
+ sha1write_u8(f, stored->flags);
- sha1write(f, &on_disk, sizeof(on_disk));
dump_bitmap(f, stored->write_as);
}
}