setup_git_directory(): fix move to worktree toplevel directory
commitbb528633b34ac9c338a7761f3e1d251e0c560ed6
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 30 Aug 2008 09:15:32 +0000 (30 16:15 +0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 31 Aug 2008 06:41:12 +0000 (30 23:41 -0700)
tree19f2b61ebb62c11c17e9e77026080c66ad3f2738
parentf83eafdd6251af29e259da8becb7610da9f3e933
setup_git_directory(): fix move to worktree toplevel directory

When setup_git_directory() returns successfully, it is supposed to move
current working directory to worktree toplevel directory.

However, the code recomputing prefix inside setup_git_directory() has
to move cwd back to original working directory, in order to get new
prefix.  After that, it should move cwd back to worktree toplevel
directory as expected.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup.c