[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: [PATCH] git-push.sh: Factor out usage statement to function; explain why rsync can't push
From: c.shoemaker () cox ! net
Date: 2005-10-29 4:17:03
Message-ID: E1EVi9P-0002Tw-BD () localhost
[Download RAW message or body]
Signed-off-by: Chris Shoemaker <c.shoemaker at cox.net>
---
git-push.sh | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
cc2f6f361691771cf461df04255a2b842b264371
diff --git a/git-push.sh b/git-push.sh
--- a/git-push.sh
+++ b/git-push.sh
@@ -1,6 +1,11 @@
#!/bin/sh
. git-sh-setup || die "Not a git archive"
+usage () {
+ die "Usage: git push [--all] [--force] <repository> [<refspec>]"
+}
+
+
# Parse out parameters and then stop at remote, so that we can
# translate it using .git/branches information
has_all=
@@ -18,8 +23,7 @@ do
--exec=*)
has_exec="$1" ;;
-*)
- die "Usage: git push [--all] [--force] <repository> <refspec>"
- ;;
+ usage ;;
*)
set x "$@"
shift
@@ -41,8 +45,10 @@ esac
shift
case "$remote" in
-http://* | https://* | git://* | rsync://* )
+http://* | https://* | git://*)
die "Cannot use READ-ONLY transport to push to $remote" ;;
+rsync://*)
+ die "Pushing with rsync transport is deprecated" ;;
esac
set x "$remote" "$@"; shift
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic