Commits

Anonymous committed 67ffdf4

Allow GIT_DIR to be an absolute path

This fixes a problem in safe_create_leading_directories() when the
argument starts with a '/' (i.e. the path is absolute).

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Comments (0)

Files changed (1)

 int safe_create_leading_directories(char *path)
 {
 	char *pos = path;
+	if (*pos == '/')
+		pos++;
 
 	while (pos) {
 		pos = strchr(pos, '/');