diff options
Diffstat (limited to 'fast-import.c')
-rw-r--r-- | fast-import.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fast-import.c b/fast-import.c index 4d55910ab9..89bb0c9db3 100644 --- a/fast-import.c +++ b/fast-import.c @@ -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); |