From: Richard Hansen <rhansen@bbn.com>
To: git@vger.kernel.org
Cc: srabbelier@gmail.com, felipe.contreras@gmail.com,
Richard Hansen <rhansen@bbn.com>
Subject: [PATCH v4 12/10] git-remote-testgit: support the new 'force' option
Date: Sun, 27 Oct 2013 17:16:28 -0400 [thread overview]
Message-ID: <1382908589-7000-1-git-send-email-rhansen@bbn.com> (raw)
In-Reply-To: <1382857521-7005-1-git-send-email-felipe.contreras@gmail.com>
Signed-off-by: Richard Hansen <rhansen@bbn.com>
---
git-remote-testgit.sh | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/git-remote-testgit.sh b/git-remote-testgit.sh
index 6d2f282..80546c1 100755
--- a/git-remote-testgit.sh
+++ b/git-remote-testgit.sh
@@ -6,6 +6,7 @@ url=$2
dir="$GIT_DIR/testgit/$alias"
prefix="refs/testgit/$alias"
+forcearg=
default_refspec="refs/heads/*:${prefix}/heads/*"
@@ -39,6 +40,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 +95,7 @@ do
before=$(git for-each-ref --format=' %(refname) %(objectname) ')
git fast-import \
+ ${forcearg} \
${testgitmarks:+"--import-marks=$testgitmarks"} \
${testgitmarks:+"--export-marks=$testgitmarks"} \
--quiet
@@ -115,6 +118,21 @@ do
echo
;;
+ option\ *)
+ read cmd opt val <<EOF
+${line}
+EOF
+ case ${opt} in
+ force)
+ case ${val} in
+ true) forcearg=--force; echo 'ok';;
+ false) forcearg=; echo 'ok';;
+ *) printf %s\\n "error '${val}'\
+ is not a valid value for option ${opt}";;
+ esac;;
+ *) echo "unsupported";;
+ esac
+ ;;
'')
exit
;;
--
1.8.4.1.614.ga09cf56
next prev parent reply other threads:[~2013-10-27 21:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-27 7:05 [PATCH v4 00/10] transport-helper: updates Felipe Contreras
2013-10-27 7:05 ` [PATCH v4 03/10] transport-helper: check for 'forced update' message Felipe Contreras
2013-10-27 7:05 ` [PATCH v4 05/10] fast-export: add new --refspec option Felipe Contreras
2013-10-27 7:05 ` [PATCH v4 06/10] transport-helper: add support for old:new refspec Felipe Contreras
2013-10-27 7:05 ` [PATCH v4 02/10] transport-helper: fix extra lines Felipe Contreras
2013-10-27 7:05 ` [PATCH v4 09/10] transport-helper: add support to delete branches Felipe Contreras
2013-10-27 7:05 ` [PATCH v4 01/10] transport-helper: add 'force' to 'export' helpers Felipe Contreras
2013-10-27 21:11 ` [PATCH v4 11/10] fixup! " Richard Hansen
2013-10-27 7:05 ` [PATCH v4 08/10] fast-export: add support to delete refs Felipe Contreras
2013-10-27 7:05 ` [PATCH v4 10/10] transport-helper: don't update refs in dry-run Felipe Contreras
2013-10-27 7:05 ` [PATCH v4 07/10] fast-import: add support to delete refs Felipe Contreras
2013-10-27 10:24 ` Eric Sunshine
2013-10-27 7:05 ` [PATCH v4 04/10] fast-export: improve argument parsing Felipe Contreras
2013-10-27 21:16 ` Richard Hansen [this message]
2013-10-27 21:16 ` [PATCH v4 13/10] test: remote-helper: add test for force pushes Richard Hansen
2013-10-29 8:41 ` [PATCH v4 12/10] git-remote-testgit: support the new 'force' option Felipe Contreras
2013-11-10 22:46 ` Richard Hansen
2013-11-11 3:57 ` Felipe Contreras
2013-11-11 18:28 ` Junio C Hamano
2013-11-12 6:09 ` Richard Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382908589-7000-1-git-send-email-rhansen@bbn.com \
--to=rhansen@bbn.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=srabbelier@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).