apply.h: drop extern on func declaration
[gitweb.git] / fast-import.c
index b2338fa8eb20d5c52d2bf03d73dca050721c292c..89bb0c9db3de9b380aad53709d882cb04f7d054a 100644 (file)
@@ -1076,7 +1076,7 @@ static int store_object(
                return 1;
        }
 
-       if (last && last->data.buf && last->depth < max_depth
+       if (last && last->data.len && last->data.buf && last->depth < max_depth
                && dat->len > the_hash_algo->rawsz) {
 
                delta_count_attempts_by_type[type]++;
@@ -1724,8 +1724,10 @@ static int update_branch(struct branch *b)
        if (!force_update && !is_null_oid(&old_oid)) {
                struct commit *old_cmit, *new_cmit;
 
-               old_cmit = lookup_commit_reference_gently(&old_oid, 0);
-               new_cmit = lookup_commit_reference_gently(&b->oid, 0);
+               old_cmit = lookup_commit_reference_gently(the_repository,
+                                                         &old_oid, 0);
+               new_cmit = lookup_commit_reference_gently(the_repository,
+                                                         &b->oid, 0);
                if (!old_cmit || !new_cmit)
                        return error("Branch %s is missing commits.", b->name);
 
@@ -1817,7 +1819,7 @@ static void dump_marks_helper(FILE *f,
 
 static void dump_marks(void)
 {
-       static struct lock_file mark_lock;
+       struct lock_file mark_lock = LOCK_INIT;
        FILE *f;
 
        if (!export_marks_file || (import_marks_file && !import_marks_file_done))