summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-01-15 05:16:23 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-01-15 05:16:23 (GMT)
commit03842d8e24face522fa0ca846283da33e747e4f0 (patch)
tree7ffac3eb9703c791a6ad6374a90abe162ce2cc30 /fast-import.c
parentd489bc14919cdd37d3978065591199d21d6719f8 (diff)
downloadgit-03842d8e24face522fa0ca846283da33e747e4f0.zip
git-03842d8e24face522fa0ca846283da33e747e4f0.tar.gz
git-03842d8e24face522fa0ca846283da33e747e4f0.tar.bz2
Misc. type cleanups within fast-import.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fast-import.c b/fast-import.c
index f0f51a6..3a98cb8 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -110,8 +110,8 @@ Format of STDIN stream:
struct object_entry
{
struct object_entry *next;
- enum object_type type;
unsigned long offset;
+ unsigned type : TYPE_BITS;
unsigned char sha1[20];
};
@@ -220,9 +220,9 @@ static unsigned long remap_count;
static unsigned long object_count;
static unsigned long duplicate_count;
static unsigned long marks_set_count;
-static unsigned long object_count_by_type[9];
-static unsigned long duplicate_count_by_type[9];
-static unsigned long delta_count_by_type[9];
+static unsigned long object_count_by_type[1 << TYPE_BITS];
+static unsigned long duplicate_count_by_type[1 << TYPE_BITS];
+static unsigned long delta_count_by_type[1 << TYPE_BITS];
/* Memory pools */
static size_t mem_pool_alloc = 2*1024*1024 - sizeof(struct mem_pool);
@@ -276,7 +276,7 @@ static struct dbuf new_data;
static FILE* branch_log;
-static void alloc_objects(int cnt)
+static void alloc_objects(unsigned int cnt)
{
struct object_entry_pool *b;