Code

Use $(git rev-parse --show-toplevel) in cd_to_toplevel().
authorSteven Drake <sdrake@xnet.co.nz>
Mon, 11 Jan 2010 22:34:34 +0000 (11:34 +1300)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Jan 2010 03:47:52 +0000 (19:47 -0800)
commit91dc602de9579fe8dc29814819904e2b5a4e92e1
tree2e337a7162a9fa0be04189951eb5a55d752b190e
parent7cceca5cccdcf1f0f9caa80b82d26fcff65e6fdf
Use $(git rev-parse --show-toplevel) in cd_to_toplevel().

rev-parse --show-toplevel gives the absolute (aka "physical") path of the
toplevel directory and is more portable as 'cd -P' is not supported by all
shell implementations.

This is also closer to what setup_work_tree() does.

Signed-off-by: Steven Drake <sdrake@xnet.co.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-sh-setup.sh