[PATCH] Cogito: Allow https:// URLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Two trivial changes allow Cogito to pull from and push to https://
URLs.  The list of available transports in cg-branch-add is being
updated as well.

Thanks, 
Dennis

[Please CC me, I'm not subscribed to this list]

---

 cg-branch-add |    6 ++++--
 cg-fetch      |    2 +-
 cg-push       |    2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/cg-branch-add b/cg-branch-add
index 4cb5a26..6c7b222 100755
--- a/cg-branch-add
+++ b/cg-branch-add
@@ -27,10 +27,12 @@
 #
 # 3. HTTP - `http://host/path`
 #
-# 4. SSH - `git+ssh://host/path` or `host:path` (the latter can change);
+# 4. HTTPS - `https://host/path`
+#
+# 5. SSH - `git+ssh://host/path` or `host:path` (the latter can change);
 #    note that the path must be absolute in the first case.
 #
-# 5. GIT-Daemon - `git://host/path` - this won't clone tags.
+# 6. GIT-Daemon - `git://host/path` - this won't clone tags.
 #
 #
 # The URL can have a fragment part, which identifies a branch inside of
diff --git a/cg-fetch b/cg-fetch
index 9f41124..e8a51e8 100755
--- a/cg-fetch
+++ b/cg-fetch
@@ -288,7 +288,7 @@ orig_head=
 
 packed_transport=
 
-if echo "$uri" | grep -q "^http://";; then
+if echo "$uri" | grep -q "^https\?://"; then
 	get=get_http
 	fetch=fetch_http
 elif echo "$uri" | grep -q "^git+ssh://"; then
diff --git a/cg-push b/cg-push
index fb212db..b6b8954 100755
--- a/cg-push
+++ b/cg-push
@@ -68,7 +68,7 @@ if echo "$uri" | grep -q '#'; then
 fi
 sprembranch=":refs/heads/$rembranch"
 
-if [ "${uri#http://}"; != "$uri" ]; then
+if [ "${uri#http://}"; != "$uri" -o "${uri#https://}"; != "$uri" ]; then
 	# git-http-push doesn't like $sprembranch
 	git-http-push "$uri/" "$locbranch:$rembranch"
 elif [ "${uri#git+ssh://}" != "$uri" ]; then
-- 
1.2.GIT

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]