{"thread":{"id":"2321","subject":"[PATCH][Cogito] Let cg-push default to git+ssh on a host:path syntax","startedAt":"2005-11-02T21:27:26Z","lastAt":"2005-11-02T21:27:26Z","messageCount":1,"participants":["Josef Weidendorfer"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"11035","messageId":"200511022227.26323.Josef.Weidendorfer@gmx.de","threadId":"2321","inReplyTo":null,"subject":"[PATCH][Cogito] Let cg-push default to git+ssh on a host:path syntax","fromName":"Josef Weidendorfer","fromEmail":"josef.weidendorfer@gmx.de","sentAt":"2005-11-02T21:27:26Z","receivedAt":"2005-11-02T21:27:26Z","isPatch":true,"sender":{"key":"josef.weidendorfer@gmx.de","avatar":null},"body":"Let cg-push default to git+ssh on a host:path syntax\n\ncg-update/cg-fetch fall back to git+ssh protocol for host:path\nsyntax. cg-push should do the same.\n\nSigned-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>\n---\n\n cg-push |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\napplies-to: 9294c00b9e87de048c0d29f8ad99c0a6d2733b16\n1f6693e09a8aa4c02297472764b972a07d1c0d02\ndiff --git a/cg-push b/cg-push\nindex 4c29b33..d63fb65 100755\n--- a/cg-push\n+++ b/cg-push\n@@ -51,8 +51,12 @@ if echo \"$uri\" | grep -q \"^http://\"; the\n \tdie \"pushing over HTTP not supported yet\"\n elif echo \"$uri\" | grep -q \"^git+ssh://\"; then\n \tgit-send-pack \"$(echo \"$uri\" | sed 's#^git+ssh://\\([^/]*\\)\\(/.*\\)$#\\1:\\2#')\" $_git_head$sprembranch \"${tags[@]}\"\n+elif echo \"$uri\" | grep -q \"^rsync://\"; then\n+        die \"pushing over rsync not supported\"\n elif echo \"$uri\" | grep -q \":\"; then\n-\tdie \"pushing over rsync not supported\"\n+\techo \"WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\"\n+\techo \"WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\"\n+\tgit-send-pack \"$uri\" $_git_head$sprembranch \"${tags[@]}\"\n else\n \tremgit=\"$uri\"; [ -d \"$remgit/.git\" ] && remgit=\"$remgit/.git\"\n \tif is_same_repo \"$_git_objects\" \"$remgit/objects\"; then\n---\n0.99.9\n"}]}