X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=sha1_file.c;h=6dcae3882bf969cce9ae0a973a80abf76e3bb814;hb=d596118d7a9b104db10e64b2680a30ea80f1439c;hp=34013014442e18bd02ae0ce33df34a89ec8d6171;hpb=afd6284a7fdbb479b5c99a87f64d7496f6fe8a27;p=git.git diff --git a/sha1_file.c b/sha1_file.c index 340130144..6dcae3882 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1987,7 +1987,7 @@ off_t find_pack_entry_one(const unsigned char *sha1, return 0; } -static int is_pack_valid(struct packed_git *p) +int is_pack_valid(struct packed_git *p) { /* An already open pack is known to be valid. */ if (p->pack_fd != -1) @@ -2038,7 +2038,7 @@ static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e) * was loaded! */ if (!is_pack_valid(p)) { - error("packfile %s cannot be accessed", p->pack_name); + warning("packfile %s cannot be accessed", p->pack_name); goto next; } e->offset = offset; @@ -2616,7 +2616,7 @@ static int index_mem(unsigned char *sha1, void *buf, size_t size, if ((type == OBJ_BLOB) && path) { struct strbuf nbuf = STRBUF_INIT; if (convert_to_git(path, buf, size, &nbuf, - write_object ? safe_crlf : 0)) { + write_object ? safe_crlf : SAFE_CRLF_FALSE)) { buf = strbuf_detach(&nbuf, &size); re_allocated = 1; }