Skip to content

Commit

Permalink
Merge branch 'jk/has-sha1-file-retry-packed' into maint
Browse files Browse the repository at this point in the history
* jk/has-sha1-file-retry-packed:
  has_sha1_file: re-check pack directory before giving up
  • Loading branch information
Junio C Hamano committed Oct 17, 2013
2 parents 87b24a4 + 45e8a74 commit 7d9dd6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2925,7 +2925,10 @@ int has_sha1_file(const unsigned char *sha1)

if (find_pack_entry(sha1, &e))
return 1;
return has_loose_object(sha1);
if (has_loose_object(sha1))
return 1;
reprepare_packed_git();
return find_pack_entry(sha1, &e);
}

static void check_tree(const void *buf, size_t size)
Expand Down

0 comments on commit 7d9dd6d

Please sign in to comment.