]> git.ipfire.org Git - thirdparty/git.git/blobdiff - abspath.c
Merge branch 'pk/stash-apply-status-relative' into maint
[thirdparty/git.git] / abspath.c
index 91ca00f05f7d648fa801a36b78c749f9d691ba43..ff140689ed2453809e7c3794c9989918e90df392 100644 (file)
--- a/abspath.c
+++ b/abspath.c
@@ -24,6 +24,10 @@ const char *make_absolute_path(const char *path)
        char *last_elem = NULL;
        struct stat st;
 
+       /* We've already done it */
+       if (path == buf || path == next_buf)
+               return path;
+
        if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX)
                die ("Too long path: %.*s", 60, path);