Volume XXII, number 280Wednesday, October 7, 2026Latest message 1 hour ago

The Git List

News and archive of git@vger.kernel.org, since April 2005

git fetch second argument parsing inconsistency

1 messages between Apr 15, 2026 and Apr 15, 2026, from Alix Brunet.

Plain Markdown or JSON for tools and agents.

Alix BrunetApr 15, 2026, 00:05 UTC on lore
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

Back to recent threads

git fetch second argument parsing inconsistency | The Git List