Commit 04e0c2b2 by Vicent Marti

pack-objects: Depth can be negative

parent 5c50f22a
...@@ -824,7 +824,7 @@ static unsigned long free_unpacked(struct unpacked *n) ...@@ -824,7 +824,7 @@ static unsigned long free_unpacked(struct unpacked *n)
static int find_deltas(git_packbuilder *pb, git_pobject **list, static int find_deltas(git_packbuilder *pb, git_pobject **list,
unsigned int *list_size, unsigned int window, unsigned int *list_size, unsigned int window,
unsigned int depth) int depth)
{ {
git_pobject *po; git_pobject *po;
git_buf zbuf = GIT_BUF_INIT; git_buf zbuf = GIT_BUF_INIT;
...@@ -839,8 +839,7 @@ static int find_deltas(git_packbuilder *pb, git_pobject **list, ...@@ -839,8 +839,7 @@ static int find_deltas(git_packbuilder *pb, git_pobject **list,
for (;;) { for (;;) {
struct unpacked *n = array + idx; struct unpacked *n = array + idx;
unsigned int max_depth; int max_depth, j, best_base = -1;
int j, best_base = -1;
git_packbuilder__progress_lock(pb); git_packbuilder__progress_lock(pb);
if (!*list_size) { if (!*list_size) {
...@@ -1033,7 +1032,7 @@ static void *threaded_find_deltas(void *arg) ...@@ -1033,7 +1032,7 @@ static void *threaded_find_deltas(void *arg)
static int ll_find_deltas(git_packbuilder *pb, git_pobject **list, static int ll_find_deltas(git_packbuilder *pb, git_pobject **list,
unsigned int list_size, unsigned int window, unsigned int list_size, unsigned int window,
unsigned int depth) int depth)
{ {
struct thread_params *p; struct thread_params *p;
int i, ret, active_threads = 0; int i, ret, active_threads = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment