setup.c:verify_non_filename(): don't die unnecessarily while disambiguating
[gitweb.git] / unpack-trees.c
index 906ce69ea6daf98cdb4f9dd3d6498264159b6b76..89dd279f89c7648ec333c59634b3169251eec7ab 100644 (file)
@@ -414,10 +414,6 @@ static void verify_uptodate(struct cache_entry *ce,
                        return;
                errno = 0;
        }
-       if (o->reset) {
-               ce->ce_flags |= htons(CE_UPDATE);
-               return;
-       }
        if (errno == ENOENT)
                return;
        die("Entry '%s' not uptodate. Cannot merge.", ce->name);
@@ -499,6 +495,9 @@ static void verify_absent(const char *path, const char *action,
        if (o->index_only || o->reset || !o->update)
                return;
 
+       if (has_symlink_leading_path(path, NULL))
+               return;
+
        if (!lstat(path, &st)) {
                int cnt;