git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Do not decode url protocol.
@ 2010-06-22  9:22 Pascal Obry
  0 siblings, 0 replies; 7+ messages in thread
From: Pascal Obry @ 2010-06-22  9:22 UTC (permalink / raw)
  To: Git Mailing List

When using the protocol git+ssh:// for example we do not want to
decode the '+' as a space.

This fixes a regression introduced in 9d2e942.
---
 url.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/url.c b/url.c
index cd32b92..ba0c1ac 100644
--- a/url.c
+++ b/url.c
@@ -70,9 +70,18 @@ static int url_decode_char(const char *q)
 static char *url_decode_internal(const char **query, const char *stop_at)
 {
 	const char *q = *query;
+	const char *first_slash;
 	struct strbuf out;

 	strbuf_init(&out, 16);
+
+	/* Skip protocol */
+	first_slash = strchr(*query, '/');
+
+	while (q < first_slash) {
+	  strbuf_addch(&out, *q++);
+	}
+
 	do {
 		unsigned char c = *q;

-- 
1.7.1.524.g6df2f


-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] Do not decode url protocol.
@ 2010-06-22  9:25 Pascal Obry
  2010-06-22 11:22 ` Matthieu Moy
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pascal Obry @ 2010-06-22  9:25 UTC (permalink / raw)
  To: Git Mailing List

Same patch with fixed formatting. Sorry.

When using the protocol git+ssh:// for example we do not want to
decode the '+' as a space.

This fixes a regression introduced in 9d2e942.
---
 url.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/url.c b/url.c
index cd32b92..94a42a5 100644
--- a/url.c
+++ b/url.c
@@ -70,9 +70,18 @@ static int url_decode_char(const char *q)
 static char *url_decode_internal(const char **query, const char *stop_at)
 {
 	const char *q = *query;
+	const char *first_slash;
 	struct strbuf out;

 	strbuf_init(&out, 16);
+
+	/* Skip protocol. */
+	first_slash = strchr(*query, '/');
+
+	while (q < first_slash) {
+		strbuf_addch(&out, *q++);
+	}
+
 	do {
 		unsigned char c = *q;

-- 
1.7.1.524.g6df2f

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-29 16:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-22  9:22 [PATCH] Do not decode url protocol Pascal Obry
  -- strict thread matches above, loose matches on Subject: below --
2010-06-22  9:25 Pascal Obry
2010-06-22 11:22 ` Matthieu Moy
2010-06-22 11:34 ` Matthieu Moy
2010-06-22 11:46   ` Pascal Obry
2010-06-23 23:54 ` René Scharfe
2010-06-29 16:50   ` Junio C Hamano

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).