transport-helper: add 'force' to 'export' helpers
Otherwise they cannot know when to force the push or not (other than hacks). Tests-by: Richard Hansen <rhansen@bbn.com> Documentation-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
5a75353fe3
commit
510fa6f518
@ -15,6 +15,8 @@ test -z "$refspec" && prefix="refs"
|
||||
|
||||
export GIT_DIR="$url/.git"
|
||||
|
||||
force=
|
||||
|
||||
mkdir -p "$dir"
|
||||
|
||||
if test -z "$GIT_REMOTE_TESTGIT_NO_MARKS"
|
||||
@ -39,6 +41,7 @@ do
|
||||
fi
|
||||
test -n "$GIT_REMOTE_TESTGIT_SIGNED_TAGS" && echo "signed-tags"
|
||||
test -n "$GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE" && echo "no-private-update"
|
||||
echo 'option'
|
||||
echo
|
||||
;;
|
||||
list)
|
||||
@ -93,6 +96,7 @@ do
|
||||
before=$(git for-each-ref --format=' %(refname) %(objectname) ')
|
||||
|
||||
git fast-import \
|
||||
${force:+--force} \
|
||||
${testgitmarks:+"--import-marks=$testgitmarks"} \
|
||||
${testgitmarks:+"--export-marks=$testgitmarks"} \
|
||||
--quiet
|
||||
@ -115,6 +119,20 @@ do
|
||||
|
||||
echo
|
||||
;;
|
||||
option\ *)
|
||||
read cmd opt val <<-EOF
|
||||
$line
|
||||
EOF
|
||||
case $opt in
|
||||
force)
|
||||
test $val = "true" && force="true" || force=
|
||||
echo "ok"
|
||||
;;
|
||||
*)
|
||||
echo "unsupported"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
'')
|
||||
exit
|
||||
;;
|
||||
|
Reference in New Issue
Block a user