Visitar URL original
Expose the git_net_url and the parser as public APIs · Issue #7398 · libgit2/libgit2 · GitHub
Skip to content

Expose the git_net_url and the parser as public APIs #7398

Description

@koichiio

I'm working on a program in Zig that needs Git remote URL details, such as the host, path, etc. I found internal functionality and types in libgit2 that do exactly that in src/util/net.h. So I'd like to request that you expose the following:

  • git_net_url (struct)
  • git_net_url_parse_standard_or_scp()
  • get_net_url_dispose()

As far as I know, there were no libraries written in C/C++/Zig that do this (while there are Rust and Go ones, those languages have a high maintenance cost for the FFI to those three languages). So I think this would be helpful for C/C++/Zig developers, especially given that Git remote URL accepts SCP-like syntax that generic URL parsers most likely cannot handle.

Sorry, I don't program in C, so I don't think I can make a mergeable PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions