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

Re: [PATCH] Git.pm: Add remote_refs() git-ls-remote frontend

From
Petr Baudis <pasky@suse.cz>
Date
May 17, 2007, 11:30 UTC
Message-ID
<20070517113028.GN4489@pasky.or.cz>
In-Reply-To
<7vk5v89ek8.fsf@assigned-by-dhcp.cox.net>
On Thu, May 17, 2007 at 07:58:31AM CEST, Junio C Hamano wrote:
Show 15 quoted lines
> Petr Baudis <pasky@suse.cz> writes:
> 
> > .... Too bad that
> >
> > 	git-ls-remote --heads .
> > 	
> > is subtly different from
> >
> > 	git-ls-remote . refs/heads/
> >
> > so we have to provide the interface for specifying both.
> 
> I've already heard you say the above elsewhere, but I am not
> sure what you exactly mean here.  Mind substantiating it a bit
> more clearly?
Because the arguments are matched like
	case "/$path" in
	*/$pat )

so if you have remote "refs" and refs/remote/refs/heads/x, git-ls-remote refs/heads/ is ambiguous. OTOH, --heads always match start of the path.

It's somewhat obscure and probably doesn't really matter for user interface, but API should be free even of obscure misbehaviour, I believe.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett
Previous: Junio C Hamano
Message 3 of 3 in “Git.pm: Add remote_refs() git-ls-remote frontend”
  1. Git.pm: Add remote_refs() git-ls-remote frontendPetr Baudis, May 17, 2007
  2. Junio C HamanoMay 17, 2007
  3. Petr BaudisMay 17, 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.