Skip to content

Wildcard matching for credentials

brian m. carlson git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 2 repliesIn review
  2. v13 patches 4 repliesSuperseded

Changes in v2 from the cover letter

* Add a variety of additional tests in patch 3.
* Switch to using the last matching config option for credential.username like we do everywhere else.
* Use all matching config keys, as we did before.
* Skip calling git_default_config.
* Fix percent-encoding handling and add a function to handle that.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5mailmap: add an additional email address for brian m. carlson.mailmap+1 -00 replies
2/5t1300: add test for urlmatch with multiple wildcardst/t1300-config.sh+6 -00 replies
3/5t0300: add tests for some additional casest/t0300-credentials.sh+108 -00 replies
4/5credential: use the last matching username in the configcredential.c credential.h t/t0300-credentials.sh+11 -30 replies
5/5credential: allow wildcard patterns when matching configDocumentation/gitcredentials.txt credential.c strbuf.c +4 more+103 -211 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/5] Wildcard matching for credentials

This series introduces wildcard matching (that is, urlmatch support) for credential config options, just like for the http options. This is helpful in corporate environments where custom credentials should be used across a wide variety of subdomains.

Changes from v1:
* Add a variety of additional tests in patch 3.
* Switch to using the last matching config option for credential.username like we do everywhere else.
* Use all matching config keys, as we did before.
* Skip calling git_default_config.
* Fix percent-encoding handling and add a function to handle that.

brian m. carlson (5):
mailmap: add an additional email address for brian m. carlson
t1300: add test for urlmatch with multiple wildcards
t0300: add tests for some additional cases
credential: use the last matching username in the config
credential: allow wildcard patterns when matching config

 .mailmap                         |   1 +
 Documentation/gitcredentials.txt |   4 +-
 credential.c                     |  75 +++++++++++++-----
 credential.h                     |   3 +-
 strbuf.c                         |  15 ++++
 strbuf.h                         |   6 ++
 t/t0300-credentials.sh           | 128 +++++++++++++++++++++++++++++++
 t/t1300-config.sh                |   6 ++
 urlmatch.c                       |   4 +-
 urlmatch.h                       |   9 +++
 10 files changed, 228 insertions(+), 23 deletions(-)