Git development
 help / color / mirror / Atom feed
From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: [PATCH][Cogito] Let cg-push default to git+ssh on a host:path syntax
Date: Wed, 2 Nov 2005 22:27:26 +0100	[thread overview]
Message-ID: <200511022227.26323.Josef.Weidendorfer@gmx.de> (raw)

Let cg-push default to git+ssh on a host:path syntax

cg-update/cg-fetch fall back to git+ssh protocol for host:path
syntax. cg-push should do the same.

Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
---

 cg-push |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

applies-to: 9294c00b9e87de048c0d29f8ad99c0a6d2733b16
1f6693e09a8aa4c02297472764b972a07d1c0d02
diff --git a/cg-push b/cg-push
index 4c29b33..d63fb65 100755
--- a/cg-push
+++ b/cg-push
@@ -51,8 +51,12 @@ if echo "$uri" | grep -q "^http://"; the
 	die "pushing over HTTP not supported yet"
 elif echo "$uri" | grep -q "^git+ssh://"; then
 	git-send-pack "$(echo "$uri" | sed 's#^git+ssh://\([^/]*\)\(/.*\)$#\1:\2#')" $_git_head$sprembranch "${tags[@]}"
+elif echo "$uri" | grep -q "^rsync://"; then
+        die "pushing over rsync not supported"
 elif echo "$uri" | grep -q ":"; then
-	die "pushing over rsync not supported"
+	echo "WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol."
+	echo "WARNING: The host:path syntax is evil because it is implicit. Please just use a URI."
+	git-send-pack "$uri" $_git_head$sprembranch "${tags[@]}"
 else
 	remgit="$uri"; [ -d "$remgit/.git" ] && remgit="$remgit/.git"
 	if is_same_repo "$_git_objects" "$remgit/objects"; then
---
0.99.9

                 reply	other threads:[~2005-11-02 21:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200511022227.26323.Josef.Weidendorfer@gmx.de \
    --to=josef.weidendorfer@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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