aboutsummaryrefslogtreecommitdiff
path: root/git-fetch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-12 12:49:05 -0800
committerJunio C Hamano <junkio@cox.net>2007-01-12 16:54:38 -0800
commit514c09fdcfef6385f1a61ee52344794356c99986 (patch)
tree54aae1aa9262a75465bfb093761e85308a5164b0 /git-fetch.sh
parent9fde9401a9c3974a407f302d60a1b75e8787f715 (diff)
downloadgit-514c09fdcfef6385f1a61ee52344794356c99986.tar.gz
git-514c09fdcfef6385f1a61ee52344794356c99986.tar.xz
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 <junkio@cox.net>
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-xgit-fetch.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/git-fetch.sh b/git-fetch.sh
index c58704d79..87b940b85 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -5,12 +5,8 @@ USAGE='<fetch-options> <repository> <refspec>...'
SUBDIRECTORY_OK=Yes
. git-sh-setup
set_reflog_action "fetch $*"
+cd_to_toplevel ;# probably unnecessary...
-TOP=$(git-rev-parse --show-cdup)
-if test ! -z "$TOP"
-then
- cd "$TOP"
-fi
. git-parse-remote
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"