summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-10-30 14:00:44 +0100
committerVicent Marti <tanoku@gmail.com>2013-10-30 14:00:44 +0100
commit04e0c2b24db73dd5101738605dc4fe90d479aa08 (patch)
treece617043772912d344f7f6d24b1b99e25d2104e6
parent5c50f22a93c78190fb7d81802199ff9defc8cf55 (diff)
downloadlibgit2-04e0c2b24db73dd5101738605dc4fe90d479aa08.tar.gz
pack-objects: Depth can be negative
-rw-r--r--src/pack-objects.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pack-objects.c b/src/pack-objects.c
index 93541e974..d2774ce6a 100644
--- a/src/pack-objects.c
+++ b/src/pack-objects.c
@@ -824,7 +824,7 @@ static unsigned long free_unpacked(struct unpacked *n)
static int find_deltas(git_packbuilder *pb, git_pobject **list,
unsigned int *list_size, unsigned int window,
- unsigned int depth)
+ int depth)
{
git_pobject *po;
git_buf zbuf = GIT_BUF_INIT;
@@ -839,8 +839,7 @@ static int find_deltas(git_packbuilder *pb, git_pobject **list,
for (;;) {
struct unpacked *n = array + idx;
- unsigned int max_depth;
- int j, best_base = -1;
+ int max_depth, j, best_base = -1;
git_packbuilder__progress_lock(pb);
if (!*list_size) {
@@ -1033,7 +1032,7 @@ static void *threaded_find_deltas(void *arg)
static int ll_find_deltas(git_packbuilder *pb, git_pobject **list,
unsigned int list_size, unsigned int window,
- unsigned int depth)
+ int depth)
{
struct thread_params *p;
int i, ret, active_threads = 0;