]> git.ipfire.org Git - thirdparty/git.git/commit
builtin: create url-parse command
authorMatheus Afonso Martins Moreira <matheus@matheusmoreira.com>
Sat, 2 May 2026 05:28:40 +0000 (05:28 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 May 2026 00:48:28 +0000 (09:48 +0900)
commit533eb14798d0e4e288401b90d4684730a3ed9266
tree01a05651e7d7e963b6f0350e0022e206010f6fda
parent18a828171243b630bc7585c7bc8d85bb37125c01
builtin: create url-parse command

Git commands can accept a rather wide variety of URLs syntaxes.
The range of accepted inputs might expand even more in the future.
This makes the parsing of URL components difficult since standard URL
parsers cannot be used. Extracting the components of a git URL would
require implementing all the schemes that git itself supports, not to
mention tracking its development continuously in case new URL schemes
are added.

The url-parse builtin command is designed to solve this problem
by exposing git's native URL parsing facilities as a plumbing command.
Other programs can then call upon git itself to parse the git URLs
and extract their components. This should be quite useful for scripts.

Signed-off-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitignore
Makefile
builtin.h
builtin/url-parse.c [new file with mode: 0644]
command-list.txt
git.c
meson.build