]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-apply.c
Optimize symlink/directory detection
[thirdparty/git.git] / builtin-apply.c
index caa3f2aa0ca147091d28013c3d2c11346e350675..1103625a4a923d92ca8d335d1a872236630541e5 100644 (file)
@@ -2247,7 +2247,7 @@ static int check_to_create_blob(const char *new_name, int ok_if_exists)
                 * In such a case, path "new_name" does not exist as
                 * far as git is concerned.
                 */
-               if (has_symlink_leading_path(new_name, NULL))
+               if (has_symlink_leading_path(strlen(new_name), new_name))
                        return 0;
 
                return error("%s: already exists in working directory", new_name);