• D
    Require a struct remote in transport_get() · c1d45cf7
    Daniel Barkalow 提交于
    cmd_ls_remote() was calling transport_get() with a NULL remote and a
    non-NULL url in the case where it was run outside a git
    repository. This involved a bunch of ill-tested special
    cases. Instead, simply get the struct remote for the URL with
    remote_get(), which works fine outside a git repository, and can also
    take global options into account.
    
    This fixes a tiny and obscure bug where "git ls-remote" without a repo
    didn't support global url.*.insteadOf, even though "git clone" and
    "git ls-remote" in any repo did.
    
    Also, enforce that all callers provide a struct remote to transport_get().
    Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    c1d45cf7
builtin-ls-remote.c 2.4 KB