]> git.ipfire.org Git - thirdparty/git.git/commit - setup.c
setup: return correct prefix if worktree is '/'
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 26 Mar 2011 09:04:24 +0000 (16:04 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 29 Mar 2011 00:01:15 +0000 (17:01 -0700)
commit9b125da490990ae4d08dd1517dc38b188b874fa8
tree1da0d8359926faf97b67946095f5e5e9937186cc
parent78bc46675353e4833a59e0f4dfa47d57a9c1a46b
setup: return correct prefix if worktree is '/'

The same old problem reappears after setup code is reworked.  We tend
to assume there is at least one path component in a path and forget
that path can be simply '/'.

Reported-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c
dir.h
setup.c