Code

Documentation: be precise about which date --pretty uses
[git.git] / sha1_file.c
index 92299ed622b802da0f40bcdcdc9fbcadd958c7a2..d1c406081e29eab9843a5268b611af1a3e014227 100644 (file)
@@ -116,6 +116,15 @@ int safe_create_leading_directories(char *path)
        return 0;
 }
 
+int safe_create_leading_directories_const(const char *path)
+{
+       /* path points to cache entries, so xstrdup before messing with it */
+       char *buf = xstrdup(path);
+       int result = safe_create_leading_directories(buf);
+       free(buf);
+       return result;
+}
+
 char *sha1_to_hex(const unsigned char *sha1)
 {
        static int bufno;