X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=cache-tree.c;h=077f03436941e9c0bf31d3bb2002c1e36b8817b9;hb=8391c60b6e08604e7023a8fff74350d6b35974af;hp=6369cc7c536ba7b82a6afcb191628beefe889b72;hpb=f95c6780c244e90abf87222126ad3b4bb18a504e;p=git.git diff --git a/cache-tree.c b/cache-tree.c index 6369cc7c5..077f03436 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -326,7 +326,7 @@ static int update_one(struct cache_tree *it, mode = ntohl(ce->ce_mode); entlen = pathlen - baselen; } - if (mode != S_IFDIRLNK && !missing_ok && !has_sha1_file(sha1)) + if (mode != S_IFGITLINK && !missing_ok && !has_sha1_file(sha1)) return error("invalid object %s", sha1_to_hex(sha1)); if (!ce->ce_mode) @@ -478,7 +478,7 @@ static struct cache_tree *read_one(const char **buffer, unsigned long *size_p) if (0 <= it->entry_count) { if (size < 20) goto free_return; - hashcpy(it->sha1, (unsigned char*)buf); + hashcpy(it->sha1, (const unsigned char*)buf); buf += 20; size -= 20; }