get_cwd_relative(): do not misinterpret suffix as subdirectory
commit490544b1282416a033dc25481db205248ac0bfc8
authorClemens Buchacher <drizzd@aon.at>
Sat, 22 May 2010 11:13:05 +0000 (22 13:13 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 May 2010 22:02:50 +0000 (28 15:02 -0700)
treec577a1d7844e2a39bcf2ba5577ad1bba9b1a08f9
parente498257d650529812ffe1872b3cd62e2bd604287
get_cwd_relative(): do not misinterpret suffix as subdirectory

If the current working directory is the same as the work tree path
plus a suffix, e.g. 'work' and 'work-xyz', then the suffix '-xyz'
would be interpreted as a subdirectory of 'work'.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c
t/t1501-worktree.sh