git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git fetch second argument parsing inconsistency

From
ABAlix Brunet <alixbrunetcontact@gmail.com>
Date
Apr 15, 2026, 00:05 UTC
Message-ID
<CAPCeX5b0T6WOnr-aCWV0CfMvPSk0KgzbnshgYgREELWjdGe=hw@mail.gmail.com>
Hello team.

I just "discovered" that the git fetch second argument parsing is inconsistent

`git fetch <url>` silently fails, but `git fetch <url> ""` fetches the default branch

I quoted "discovered" because imagine this might have been discovered before, but it took me too long to figure out, and the docs page ( https://git-scm.com/docs/git-fetch ) doesn't mention it either.

I figure this is either an unwanted behavior, an error that should not be silent, or at the very least something that needs documentation.

Sincerely, Malix - https://github.com/Malix-Labs

Message 1 of 1 in “git fetch second argument parsing inconsistency”
  1. Alix BrunetApr 15, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.