Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/has-sha1-file-retry-packed' into maint
author
Junio C Hamano
<gitster@pobox.com>
Thu, 17 Oct 2013 22:45:54 +0000
(15:45 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 17 Oct 2013 22:45:54 +0000
(15:45 -0700)
* jk/has-sha1-file-retry-packed:
has_sha1_file: re-check pack directory before giving up
sha1_file.c
patch
|
blob
|
history
raw
(from parent 1:
87b24a4
)
diff --git
a/sha1_file.c
b/sha1_file.c
index 8e27db1bd2b49f28b235fcd7e18a0dda43a1f045..06784fb95af2ddbdbfc6ed97e6ccf2ac920393b3 100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-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)