update_head_ok=
exec=
upload_pack=
-keep=--thin
+keep=
while case "$#" in 0) break ;; esac
do
case "$1" in
verbose=Yes
;;
-k|--k|--ke|--kee|--keep)
- keep=--keep
+ keep='-k -k'
;;
--reflog-action=*)
rloga=`expr "z$1" : 'z-[^=]*=\(.*\)'`
;; # we are already done.
*)
( : subshell because we muck with IFS
+ pack_lockfile=
IFS=" $LF"
(
- git-fetch-pack $exec $keep "$remote" $rref || echo failed "$remote"
+ git-fetch-pack --thin $exec $keep "$remote" $rref || echo failed "$remote"
) |
while read sha1 remote_name
do
failed)
echo >&2 "Fetch failure: $remote"
exit 1 ;;
+ # special line coming from index-pack with the pack name
+ pack)
+ continue ;;
+ keep)
+ pack_lockfile="$GIT_OBJECT_DIRECTORY/pack/pack-$remote_name.keep"
+ continue ;;
esac
found=
single_force=
append_fetch_head "$sha1" "$remote" \
"$remote_name" "$remote_nick" "$local_name" "$not_for_merge"
done
+ if [ "$pack_lockfile" ]; then rm -f "$pack_lockfile"; fi
) || exit ;;
esac
# using local tracking branch.
taglist=$(IFS=" " &&
git-ls-remote $upload_pack --tags "$remote" |
- sed -ne 's|^\([0-9a-f]*\)[ ]\(refs/tags/.*\)^{}$|\1 \2|p' |
+ sed -n -e 's|^\('"$_x40"'\) \(refs/tags/.*\)^{}$|\1 \2|p' \
+ -e 's|^\('"$_x40"'\) \(refs/tags/.*\)$|\1 \2|p' |
while read sha1 name
do
- git-show-ref --verify --quiet -- $name && continue
+ git-show-ref --verify --quiet -- "$name" && continue
git-check-ref-format "$name" || {
echo >&2 "warning: tag ${name} ignored"
continue