提交 67ffdf4c 编写于 作者: J Johannes Schindelin 提交者: Junio C Hamano

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: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 bee8e79d
......@@ -51,6 +51,8 @@ int get_sha1_hex(const char *hex, unsigned char *sha1)
int safe_create_leading_directories(char *path)
{
char *pos = path;
if (*pos == '/')
pos++;
while (pos) {
pos = strchr(pos, '/');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册