X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=entry.c;h=b2ea0efa82e1a0511fe5aa798618c23827b59bab;hb=b1bfcae438adb485bb66e2f59396373809e346e6;hp=5d9aefd03fa4ff0e86d1212dc3354c9b50bba22a;hpb=2593a410e095f89f0eef40edb90b39029574462b;p=git.git diff --git a/entry.c b/entry.c index 5d9aefd03..b2ea0efa8 100644 --- a/entry.c +++ b/entry.c @@ -1,6 +1,7 @@ #include #include #include "cache.h" +#include "blob.h" static void create_directories(const char *path, struct checkout *state) { @@ -72,7 +73,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat char type[20]; new = read_sha1_file(ce->sha1, type, &size); - if (!new || strcmp(type, "blob")) { + if (!new || strcmp(type, blob_type)) { if (new) free(new); return error("git-checkout-index: unable to read sha1 file of %s (%s)", @@ -134,7 +135,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath) { - static char path[MAXPATHLEN+1]; + static char path[PATH_MAX + 1]; struct stat st; int len = state->base_dir_len; @@ -171,5 +172,3 @@ int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath) create_directories(path, state); return write_entry(ce, path, state, 0); } - -