X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-update-index.c;h=509369e9e7b1719e53ba2dd2d976066fb9513353;hb=5bd148bfe8a4f2df8487e029cd4ee6809bc4c963;hp=8f9899178b1755ee0acd4a34ee185a4f54fb4219;hpb=76026200eee9fea016c2d87f472bb13cb15f47b2;p=git.git diff --git a/builtin-update-index.c b/builtin-update-index.c index 8f9899178..509369e9e 100644 --- a/builtin-update-index.c +++ b/builtin-update-index.c @@ -134,7 +134,7 @@ static int process_directory(const char *path, int len, struct stat *st) /* Exact match: file or existing gitlink */ if (pos >= 0) { struct cache_entry *ce = active_cache[pos]; - if (S_ISDIRLNK(ntohl(ce->ce_mode))) { + if (S_ISGITLINK(ntohl(ce->ce_mode))) { /* Do nothing to the index if there is no HEAD! */ if (resolve_gitlink_ref(path, "HEAD", sha1) < 0) @@ -178,7 +178,7 @@ static int process_file(const char *path, int len, struct stat *st) int pos = cache_name_pos(path, len); struct cache_entry *ce = pos < 0 ? NULL : active_cache[pos]; - if (ce && S_ISDIRLNK(ntohl(ce->ce_mode))) + if (ce && S_ISGITLINK(ntohl(ce->ce_mode))) return error("%s is already a gitlink, not replacing", path); return add_one_path(ce, path, len, st);