From 514c09fdcfef6385f1a61ee52344794356c99986 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 12 Jan 2007 12:49:05 -0800 Subject: Use cd_to_toplevel in scripts that implement it by hand. This converts scripts that do "cd $(rev-parse --show-cdup)" by hand to use cd_to_toplevel. I think git-fetch does not have to go to the toplevel, but that should be dealt with in a separate patch. Signed-off-by: Junio C Hamano --- git-checkout.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'git-checkout.sh') diff --git a/git-checkout.sh b/git-checkout.sh index a2b8e4fa4a..66e40b90eb 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -135,11 +135,7 @@ fi # We are switching branches and checking out trees, so # we *NEED* to be at the toplevel. -cdup=$(git-rev-parse --show-cdup) -if test ! -z "$cdup" -then - cd "$cdup" -fi +cd_to_toplevel [ -z "$new" ] && new=$old && new_name="$old_name" -- cgit v1.2.3