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

Re: [PATCH v2 1/6] transport-helper: clarify *:* refspec

From
John Keeping <john@keeping.me.uk>
Date
Apr 18, 2013, 09:45 UTC
Message-ID
<20130418094531.GU2278@serenity.lan>
In-Reply-To
<CAMP44s0cJwHSJrWKkWAwKSv8OE=OqVRdKEtBNdAvQ7YAE5-JKw@mail.gmail.com>
On Thu, Apr 18, 2013 at 04:27:57AM -0500, Felipe Contreras wrote:
Show 18 quoted lines
> On Thu, Apr 18, 2013 at 3:24 AM, John Keeping <john@keeping.me.uk> wrote:
> > On Wed, Apr 17, 2013 at 11:14:28PM -0500, Felipe Contreras wrote:
> >> diff --git a/Documentation/gitremote-helpers.txt b/Documentation/gitremote-helpers.txt
> >> index f506031..0c91aba 100644
> >> --- a/Documentation/gitremote-helpers.txt
> >> +++ b/Documentation/gitremote-helpers.txt
> >> @@ -174,8 +174,8 @@ ref.
> >>  This capability can be advertised multiple times.  The first
> >>  applicable refspec takes precedence.  The left-hand of refspecs
> >>  advertised with this capability must cover all refs reported by
> >> -the list command.  If a helper does not need a specific 'refspec'
> >> -capability then it should advertise `refspec *:*`.
> >> +the list command.  If no 'refspec' capability is advertised,
> >> +there is an implied `refspec *:*`.
> >
> > This is wrong.
> 
> It has been like that since v1.7.0.

That doesn't mean it's right. I suspect that it was originally correct, but then 'export' was added at which point this became stale.

Show 16 quoted lines
> > As your later patch makes clearer, there is no implied
> > refspec for push - it only works for fetch.  I found the wording you've
> > reverted to extremely misleading.  How about something like this:
> >
> >     For historical reasons, 'import' treats the absence of a 'refspec'
> >     line as equivalent to `refspec *:*`; remote helpers should always
> >     specify an explicit refspec.
> 
> Maybe my version was "misleading" because it didn't mention it was for
> historical reasons, but yours is plain wrong; remote helpers might not
> be using 'import' or 'export' at all, so not all remote helpers should
> always specify an explicit refspec. And if the previous text "It is
> recommended that all importers providing the 'import' capability use
> this. It's mandatory for 'export'." does not convey the idea these
> remote helpers should always specify an explicit refspec, I don't know
> what it does.

I didn't say mine was correct, but there was a reason that I wanted to change the existing text. Just going back to what was there before is not a good way to make things better.

In my copy of pu I don't see the text "It's mandatory for 'export'", it just stops after "It is recommended that all importers providing the 'import' capability use this". That paragraph also starts with "This modifies the 'import' capability" making no mention of export.

Perhaps we need a slightly more extensive re-write of the documentation for refspec to make it very clear where it applies and when it is needed.

Previous: Felipe ContrerasNext: Felipe Contreras
Message 5 of 26 in “transport-helper: some clarifications and a fix”
  1. 0/6 transport-helper: some clarifications and a fixFelipe Contreras, Apr 18, 2013
  2. 1/6 transport-helper: clarify *:* refspecFelipe Contreras, Apr 18, 2013
  3. John KeepingApr 18, 2013
  4. Felipe ContrerasApr 18, 2013
  5. John KeepingApr 18, 2013
  6. Felipe ContrerasApr 18, 2013
  7. John KeepingApr 18, 2013
  8. Junio C HamanoApr 18, 2013
  9. Felipe ContrerasApr 18, 2013
  10. 2/6 transport-helper: update refspec documentationFelipe Contreras, Apr 18, 2013
  11. 3/6 transport-helper: clarify pushing without refspecsFelipe Contreras, Apr 18, 2013
  12. John KeepingApr 18, 2013
  13. Felipe ContrerasApr 18, 2013
  14. John KeepingApr 18, 2013
  15. Junio C HamanoApr 18, 2013
  16. John KeepingApr 18, 2013
  17. Junio C HamanoApr 18, 2013
  18. Eric SunshineApr 19, 2013
  19. Felipe ContrerasApr 19, 2013
  20. Junio C HamanoApr 19, 2013
  21. 4/6 transport-helper: warn when refspec is not usedFelipe Contreras, Apr 18, 2013
  22. Junio C HamanoApr 18, 2013
  23. Felipe ContrerasApr 18, 2013
  24. 5/6 transport-helper: trivial code shuffleFelipe Contreras, Apr 18, 2013
  25. 6/6 transport-helper: update remote helper namespaceFelipe Contreras, Apr 18, 2013
  26. Junio C HamanoApr 18, 2013

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.