GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — remote: use configured remote names when the URL is empty by hakarrr · Pull Request #7477 · libgit2/libgit2

Conversation

@hakarrr

@hakarrr hakarrr commented Nov 11, 2026

Copy link
Copy Markdown

A configured remote with no URL currently either fails lookup or returns a
NULL URL. Git uses the remote's name in both cases. Follow that behavior,
including URL rewrites and an explicit push URL, while still returning
GIT_ENOTFOUND when the remote has no configuration.

Recognize remotes with settings other than URL/pushURL in lookup and listing.
This also means creating a remote over an existing prune-only configuration
returns GIT_EEXISTS, as Git does. Update the prune test to load its configured
remote instead of recreating it.

Reject a bare URL/pushURL setting with no value instead of confusing it with
an explicit empty value. Add lookup, rewrite, list, local connection and
rename/set-url/delete coverage; document the fallback.

Fixes #7028

Validation:

  • Built current Git 1891de46 and checked missing/empty URL, push-only,
    rewrite, explicit pushURL and missing-remote behavior.
  • Focused remote suites: 57 tests pass (network::remote::remotes 40,
    remote::list 2, network::fetchlocal 15).
  • Native Debug offline selection: 3073 pass, 44 skip, 0 fail.
  • GCC 11.4 -Werror with ASan/UBSan and leak detection: 7 remote suites
    (125 tests) clean; offline selection 3073 pass, 43 skip, 0 fail, 0 sanitizer
    reports.
  • Offline selection excludes online and clone::nonetwork. Both builds exclude
    core::structinit, whose padding comparison fails on unchanged baseline.
    Sanitizer selection additionally excludes pack::threadsafety: the unexcluded
    run reports 8848 bytes / 75 allocations leaked, identically reproduced on
    baseline.
  • Linux x86_64 only; HTTPS/SSH/NTLM unavailable and disabled.

Known differences from Git:

  • A bare, value-less url/pushURL entry makes lookup fail with a generic
    invalid-argument error where Git exits with a config error; both reject it.
  • git_remote_list still lists a remote whose url entry has no value; Git's
    git remote fails the whole config read in that case.
  • A multi-valued url keeps last-value-wins (pre-existing behavior, unchanged).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hakarrr and others added 16 commits November 11, 2026 13:51
@hakarrr @GeneralTony007
remote: use configured remote names when the URL is empty
ba0bd33
Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
remote: use configured remote names when the URL is empty
20dbe18
Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
remote: use configured remote names when the URL is empty
cd14dac
Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
remote: use configured remote names when the URL is empty
1aef791
Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
remote: use configured remote names when the URL is empty
83feb24
Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Upload reviewed src/libgit2/remote.c (temporary prefixed name, rename…
1420b63
…d in next commit)

Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Rename 7-remote.c to remote.c (reviewed content now at its proper path)
7cc6e08
Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Remove tests/libgit2/network/fetchlocal.c ahead of uploading the revi…
2e046e4
…ewed replacement

Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Upload reviewed tests/libgit2/network/fetchlocal.c (temporary prefixe…
c885fcc
…d name, renamed in next commit)

Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Rename 8-fetchlocal.c to fetchlocal.c (reviewed content now at its pr…
76f5d20
…oper path)

Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Remove tests/libgit2/network/remote/remotes.c ahead of uploading the …
042ea5d
…reviewed replacement

Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Upload reviewed tests/libgit2/network/remote/remotes.c (temporary pre…
4d9af12
…fixed name, renamed in next commit)

Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Rename 9-remotes.c to remotes.c (reviewed content now at its proper p…
88163d6
…ath)

Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Remove tests/libgit2/remote/list.c ahead of uploading the reviewed re…
5625609
…placement

Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Upload reviewed tests/libgit2/remote/list.c (temporary prefixed name,…
923eebb
… renamed in next commit)

Co-authored-by: GeneralTony007 <[email protected]>
@hakarrr @GeneralTony007
Rename 10-list.c to list.c (reviewed content now at its proper path)
60198e7
Co-authored-by: GeneralTony007 <[email protected]>

This branch has not been deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Unset or empty remote URL behavior does not match with git CLI

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@hakarrr
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.