docs: clarify that --encoding can produce invalid sequences
[gitweb.git] / git-remote-testgit.sh
index cbf470f64f0b93c520ce55d1b93c866b669bfbaa..a9c75a2360fec7a9ce5f22877a471f70bc405ff1 100755 (executable)
@@ -16,6 +16,8 @@ test -z "$refspec" && prefix="refs"
 GIT_DIR="$url/.git"
 export GIT_DIR
 
+force=
+
 mkdir -p "$dir"
 
 if test -z "$GIT_REMOTE_TESTGIT_NO_MARKS"
@@ -40,6 +42,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)
@@ -94,6 +97,7 @@ do
                before=$(git for-each-ref --format=' %(refname) %(objectname) ')
 
                git fast-import \
+                       ${force:+--force} \
                        ${testgitmarks:+"--import-marks=$testgitmarks"} \
                        ${testgitmarks:+"--export-marks=$testgitmarks"} \
                        --quiet
@@ -116,6 +120,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
                ;;