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

Where has "git ls-remote" reference pattern matching gone?

From
Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>
Date
Dec 8, 2007, 22:05 UTC
Message-ID
<4E5E5B1E-A303-45C9-9944-57D54FD50F80@orakel.ntnu.no>

git-ls-remote(1) says that ls-remote supports filtering by reference name:

Show 25 quoted lines
> SYNOPSIS
>        git-ls-remote [--heads] [--tags]  [-u <exec> | --upload-pack  
> <exec>]
>                      <repository> <refs>...
>
> [...]
>
>        <refs>...
>               When unspecified, all references, after filtering done  
> with
>               --heads and --tags, are shown. When <refs>... are  
> specified,
>               only references matching the given patterns are  
> displayed.
>
> [...]
>
>        $ git ls-remote --tags public v\*
>        d6602ec5194c87b0fc87103ca4d67251c76f233a        refs/tags/v0.99
>        f25a265a342aed6041ab0cc484224d9ca54b6f41        refs/tags/ 
> v0.99.1
>        c5db5456ae3b0873fc659c19fafdde22313cc441        refs/tags/ 
> v0.99.2
>        7ceca275d047c90c0c7d5afb13ab97efdf51bd6e        refs/tags/ 
> v0.99.3

But when I try to use the <refs> argument on a current build of git (git version v1.5.3.7-1112-g9758ecd), I just get its usage message, which doesn't mention that argument:

> vredefort:[backup]% git ls-remote origin foob
> usage: git-ls-remote [--upload-pack=<git-upload-pack>]  
> [<host>:]<directory>

ls-remote was recently made a builtin; was reference filtering deliberately removed, or was it just lost in translation from the shell script?

Eyvind Bernhardsen
Next: Junio C Hamano
Message 1 of 4 in “Where has "git ls-remote" reference pattern matching gone?”
  1. Eyvind BernhardsenDec 8, 2007
  2. Junio C HamanoDec 9, 2007
  3. Daniel BarkalowDec 9, 2007
  4. Eyvind BernhardsenDec 9, 2007

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.