git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/4] config: add support for http.<url>.* settings
@ 2013-07-19 12:48 Kyle J. McKay
  2013-07-19 12:48 ` [PATCH v6 1/4] " Kyle J. McKay
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Kyle J. McKay @ 2013-07-19 12:48 UTC (permalink / raw)
  To: git
  Cc: David Aguilar, Petr Baudis, Junio C Hamano, Richard Hartmann,
	Jeff King, Daniel Knittl-Frank, Jan Krüger, Alejandro Mery,
	Aaron Schrab, Eric Sunshine

NOTE: This patch requires the following preparatory change:

 f1ff763 http.c: fix parsing of http.sslCertPasswordProtected variable

which is currently in pu.


This patch series adds support for http.<url>.* settings.  The patch is
organized as a series of improvements on the functionality:

1/4 - adds basic textual matching support
2/4 - adds URL normalization before matching
3/4 - adds a test for the URL normalization function
4/4 - adds any user matching


With-Feedback-From-jh: Junio C Hamano <gitster@pobox.com>
With-Feedback-From-jk: Jeff King <peff@peff.net>
With-Feedback-From-es: Eric Sunshine <sunshine@sunshineco.com>

Differences from v5:

Dropped the GIT_SSL_CERT_PASSWORD_PROTECTED patch.  It's related to the
http.sslCertPasswordProtected patch, but not required as it touches different
sections of the http.c file.

1/4 - this is identical to v5's 3/5.  Updated from v4's 1/4:

* Added cover comments to log message (feedback-jh)
* Updated help text (feedback-jk)
* Uppercased enum values (feedback-jk)
* Moved #ifdef enum values to end (feedback-jh)
* Renamed check_matched_len to new_match_is_shorter (feedback-jh)
* Removed 1 unnecessary cast (feedback-jk,feedback-jh)
* Based on preparatory http.sslCertPasswordProtected fix (feedback-jh)

2/4 - Updated from v5's 4/5:

* Altered append_normalized_escapes descriptive comments (feedback-es)
* Improved normalization (keep empty user name, strip port leading 0s and
  resolve . and .. in path)

3/4 - Updated from v5's 5/5:

* Add more tests and adjust to improved normalization behavior

4/4 - New code

* Allow a http.<url>.* config item without a user name to match a url passed
  to git that has a user name


Applicable comments from v5 cover:

To better support matching URLs that are equivalent but spelled differently, a
url_normalize function has been added.  Currently this patch leaves it in
http.c as http_options_url_normalize as I am unclear whether it should go into
url.{h,c} at this time since only http.c uses it.

Since the url_normalize function's behavior is non-trivial, it is presented as
a separate patch on top of the basic http.<url>.* settings support.  A new test
for it has also been included as a separate patch.  I am unclear on the proper
number for this test, but have gone ahead and put it with the other http tests
since this patch series places the url_normalize function into http.c.


Kyle J. McKay (4):
  config: add support for http.<url>.* settings
  config: improve support for http.<url>.* settings
  tests: add new test for the url_normalize function
  config: allow http.<url>.* any user matching

 .gitignore               |   1 +
 Documentation/config.txt |  19 ++
 Makefile                 |   5 +
 http.c                   | 675 +++++++++++++++++++++++++++++++++++++++++++++--
 t/t5200-url-normalize.sh | 161 +++++++++++
 test-url-normalize.c     |  62 +++++
 6 files changed, 906 insertions(+), 17 deletions(-)
 create mode 100755 t/t5200-url-normalize.sh
 create mode 100644 test-url-normalize.c

-- 
1.8.3

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

end of thread, other threads:[~2013-07-20  0:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19 12:48 [PATCH v6 0/4] config: add support for http.<url>.* settings Kyle J. McKay
2013-07-19 12:48 ` [PATCH v6 1/4] " Kyle J. McKay
2013-07-19 20:08   ` Junio C Hamano
2013-07-19 23:40     ` Kyle J. McKay
2013-07-19 12:48 ` [PATCH v6 2/4] config: improve " Kyle J. McKay
2013-07-19 19:59   ` Junio C Hamano
2013-07-19 23:37     ` Kyle J. McKay
2013-07-20  0:35       ` Junio C Hamano
2013-07-19 12:48 ` [PATCH v6 3/4] tests: add new test for the url_normalize function Kyle J. McKay
2013-07-19 12:48 ` [PATCH v6 4/4] config: allow http.<url>.* any user matching Kyle J. McKay

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