Subject: Re: [PATCH v3 0/8] builtin: implement, document and test url-parse

From: Matheus Afonso Martins Moreira <[email-masked]>
Date: Sun, 03 May 2026 01:29:38 -0300

Junio C Hamano <[email-masked]> writes:

> Nitpick.  With "git url-parse", these scripts has to do what they
> traditionally have always done, i.e., shell out to the command, no?

It's a good point. I should have worded it better:

  Tools wanting to reason about them have historically had to
  reimplement git's parsing logic externally. With git url-parse,
  scripts can delegate URL parsing to git's own parser: validate
  a URL, extract a component (scheme, user, host, port, path,
  password), or both.

What I meant to say is that git's URL parsing was never exposed
as a standalone operation, leading external tools to reimplement
the logic themselves.

For example:

    npm/git-url-parse       millions of weekly downloads
    crates/git-url-parse    half a million downloads

With this builtin, scripts can rely on git's own parser
instead of a third party reimplementation.

References:
    https://www.npmjs.com/package/git-url-parse
    https://crates.io/crates/git-url-parse