Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
pack-bitmap: convert struct stored_bitmap to object_id
author
brian m. carlson
<sandals@crustytoothpaste.net>
Tue, 19 Feb 2019 00:04:55 +0000
(
00:04
+0000)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 1 Apr 2019 02:57:37 +0000
(11:57 +0900)
Convert struct stored_bitmap to use struct object_id.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-bitmap.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0f4d6ca
)
diff --git
a/pack-bitmap.c
b/pack-bitmap.c
index b53f37243c363d42778dea561d91db9cdf1e35bf..c760913cea2127e528d6d62319089393d14b3148 100644
(file)
--- a/
pack-bitmap.c
+++ b/
pack-bitmap.c
@@
-18,7
+18,7
@@
* commit.
*/
struct stored_bitmap {
* commit.
*/
struct stored_bitmap {
-
unsigned char sha1[20]
;
+
struct object_id oid
;
struct ewah_bitmap *root;
struct stored_bitmap *xor;
int flags;
struct ewah_bitmap *root;
struct stored_bitmap *xor;
int flags;
@@
-181,9
+181,9
@@
static struct stored_bitmap *store_bitmap(struct bitmap_index *index,
stored->root = root;
stored->xor = xor_with;
stored->flags = flags;
stored->root = root;
stored->xor = xor_with;
stored->flags = flags;
-
hashcpy(stored->sha1
, sha1);
+
oidread(&stored->oid
, sha1);
- hash_pos = kh_put_sha1(index->bitmaps, stored->
sha1
, &ret);
+ hash_pos = kh_put_sha1(index->bitmaps, stored->
oid.hash
, &ret);
/* a 0 return code means the insertion succeeded with no changes,
* because the SHA1 already existed on the map. this is bad, there
/* a 0 return code means the insertion succeeded with no changes,
* because the SHA1 already existed on the map. this is bad, there
@@
-1080,7
+1080,7
@@
int rebuild_existing_bitmaps(struct bitmap_index *bitmap_git,
lookup_stored_bitmap(stored),
rebuild)) {
hash_pos = kh_put_sha1(reused_bitmaps,
lookup_stored_bitmap(stored),
rebuild)) {
hash_pos = kh_put_sha1(reused_bitmaps,
- stored->
sha1
,
+ stored->
oid.hash
,
&hash_ret);
kh_value(reused_bitmaps, hash_pos) =
bitmap_to_ewah(rebuild);
&hash_ret);
kh_value(reused_bitmaps, hash_pos) =
bitmap_to_ewah(rebuild);