git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Cogito: Allow https:// URLs

From
DSDennis Stosberg <dennis@stosberg.net>
Date
Mar 22, 2006, 11:45 UTC
Message-ID
<20060322114508.G66c5922@leonov.stosberg.net>
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
Message 1 of 1 in “Cogito: Allow https:// URLs”
  1. Cogito: Allow https:// URLsDennis Stosberg, Mar 22, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.