mkdir -p "$clone_tmp" || exit 1
http_fetch "$1/info/refs" "$clone_tmp/refs" || {
echo >&2 "Cannot get remote repository information.
mkdir -p "$clone_tmp" || exit 1
http_fetch "$1/info/refs" "$clone_tmp/refs" || {
echo >&2 "Cannot get remote repository information.
*,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local) use_local=yes ;;
*,-s|*,--s|*,--sh|*,--sha|*,--shar|*,--share|*,--shared)
local_shared=yes; use_local=yes ;;
*,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local) use_local=yes ;;
*,-s|*,--s|*,--sh|*,--sha|*,--shar|*,--share|*,--shared)
local_shared=yes; use_local=yes ;;
# new style repository with a symref HEAD).
# Ideally we should skip the guesswork but for now
# opt for minimum change.
# new style repository with a symref HEAD).
# Ideally we should skip the guesswork but for now
# opt for minimum change.
- name=`expr "$dotslref" : './\(.*\)'` &&
- test "$use_separate_remote" = '' && {
- test "$head_points_at" = "$name" ||
- test "$origin" = "$name"
- } ||
+ name=`expr "$dotslref" : './\(.*\)'`
+ if test "z$head_points_at" = "z$name"
+ then
+ continue
+ fi
+ if test "$use_separate_remote" = '' &&
+ test "z$origin" = "z$name"
+ then
+ continue
+ fi
echo "Pull: refs/heads/${name}:$remote_top/${name}"
done >>"$GIT_DIR/remotes/$origin" &&
case "$use_separate_remote" in
echo "Pull: refs/heads/${name}:$remote_top/${name}"
done >>"$GIT_DIR/remotes/$origin" &&
case "$use_separate_remote" in