X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=entry.c;h=c540ae13e858685faa8dbbada5b064074235ae6d;hb=1a6f3999998a22325ff820bf8c840e3baf3d2281;hp=82bf7259a7d1d34a92a9bf214bccd9771748c582;hpb=f95c6780c244e90abf87222126ad3b4bb18a504e;p=git.git diff --git a/entry.c b/entry.c index 82bf7259a..c540ae13e 100644 --- a/entry.c +++ b/entry.c @@ -31,7 +31,7 @@ static void remove_subtree(const char *path) struct dirent *de; char pathbuf[PATH_MAX]; char *name; - + if (!dir) die("cannot opendir %s (%s)", path, strerror(errno)); strcpy(pathbuf, path); @@ -145,7 +145,7 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout "symlink %s (%s)", path, strerror(errno)); } break; - case S_IFDIRLNK: + case S_IFGITLINK: if (to_tempfile) return error("git-checkout-index: cannot create temporary subproject %s", path); if (mkdir(path, 0777) < 0) @@ -194,7 +194,7 @@ int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *t unlink(path); if (S_ISDIR(st.st_mode)) { /* If it is a gitlink, leave it alone! */ - if (S_ISDIRLNK(ntohl(ce->ce_mode))) + if (S_ISGITLINK(ntohl(ce->ce_mode))) return 0; if (!state->force) return error("%s is a directory", path);