* [PATCH] Cogito: Allow https:// URLs
@ 2006-03-22 11:45 Dennis Stosberg
0 siblings, 0 replies; only message in thread
From: Dennis Stosberg @ 2006-03-22 11:45 UTC (permalink / raw)
To: git
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-22 11:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-22 11:45 [PATCH] Cogito: Allow https:// URLs Dennis Stosberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).