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

Re: [PATCH] transport-helper: do not request symbolic refs to remote helpers

From
Mike Hommey <mh@glandium.org>
Date
Jan 22, 2015, 08:06 UTC
Message-ID
<20150122080638.GA9546@glandium.org>
In-Reply-To
<xmqqbnlruurk.fsf@gitster.dls.corp.google.com>
On Wed, Jan 21, 2015 at 11:41:51PM -0800, Junio C Hamano wrote:
Show 14 quoted lines
> Mike Hommey <mh@glandium.org> writes:
> 
> > Note the most important part is actually between the parens: that only
> > happens when the remote helper returns '?' to the `list` command, which
> > non-git remotes helpers (like git-remote-hg or git-remote-bzr) do.
> > git-remote-testgit also does, so if you only apply the test parts of the
> > patch, you'll see that the test fails.
> >
> > remote-curl probably doesn't hit the problem because it's not returning
> > '?' to `list`.
> 
> Hmm, that suggests that the new codepath should be taken only when
> the remote helper says '?' (does it mean "I dunno"? where are these
> documented, by the way?)
in Documentation/gitremote-helpers.txt
> , yes?  It wasn't immediately obvious from
> the patch text that it was the case.

The patch changes the behavior in all cases, because it didn't feel necessary to have a different behavior between the "normal" case and the '?' case: it makes sense to request the ref being pointed at than the symbolic ref in every case. Moreover, this makes existing non-git remote-helpers work without having to modify them to provide a refspec for HEAD (none of the 5 mercurial remote-helpers I checked do). The paragraph before last in the commit message mentioned this in maybe not very clear terms.

Mike
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 8 in “transport-helper: do not request symbolic refs to remote helpers”
  1. transport-helper: do not request symbolic refs to remote helpersMike Hommey, Jan 19, 2015
  2. Junio C HamanoJan 22, 2015
  3. Mike HommeyJan 22, 2015
  4. Junio C HamanoJan 22, 2015
  5. Mike HommeyJan 22, 2015
  6. Junio C HamanoJan 22, 2015
  7. Mike HommeyJan 22, 2015
  8. Junio C HamanoJan 22, 2015

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.