# [PATCH] gitremote-helpers(1): clarify refspec behaviour

3 messages from 2013-04-06 to 2013-04-17. Participants: John Keeping, Sverre Rabbelier, Felipe Contreras.
Thread: https://gitlist.dev/t/33407

## John Keeping, 2013-04-06 18:13

Subject: [PATCH] gitremote-helpers(1): clarify refspec behaviour
Message-ID: <505914600ac7f4afc26f8b29fbece26156c87519.1365272021.git.john@keeping.me.uk>
URL: https://gitlist.dev/e/505914600ac7f4afc26f8b29fbece26156c87519.1365272021.git.john%40keeping.me.uk

```
The documentation says that "If no 'refspec' capability is advertised,
there is an implied `refspec *:*`" but this is only the case for the
"import" command.

Since there is a comment in transport-helper.c indicating that this
default is for historical reasons, change the documentation to clarify
that a refspec should always be specified.

Signed-off-by: John Keeping <john@keeping.me.uk>
---
 Documentation/gitremote-helpers.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/gitremote-helpers.txt b/Documentation/gitremote-helpers.txt
index 0c91aba..f506031 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 no 'refspec' capability is advertised,
-there is an implied `refspec *:*`.
+the list command.  If a helper does not need a specific 'refspec'
+capability then it should advertise `refspec *:*`.
 
 'bidi-import'::
 	This modifies the 'import' capability.
-- 
1.8.2.692.g17a9715

```

## Sverre Rabbelier, 2013-04-06 18:15

Subject: Re: [PATCH] gitremote-helpers(1): clarify refspec behaviour
Message-ID: <CAGdFq_jrYu23yyQyDEDD=72f7UrhWBL0bnmZ7XLtBM=F4Hwzug@mail.gmail.com>
URL: https://gitlist.dev/e/CAGdFq_jrYu23yyQyDEDD%3D72f7UrhWBL0bnmZ7XLtBM%3DF4Hwzug%40mail.gmail.com
In-Reply-To: <505914600ac7f4afc26f8b29fbece26156c87519.1365272021.git.john@keeping.me.uk>

```
In Sat, Apr 6, 2013 at 11:13 AM, John Keeping <john@keeping.me.uk> wrote:
> The documentation says that "If no 'refspec' capability is advertised,
> there is an implied `refspec *:*`" but this is only the case for the
> "import" command.
>
> Since there is a comment in transport-helper.c indicating that this
> default is for historical reasons, change the documentation to clarify
> that a refspec should always be specified.
>
> Signed-off-by: John Keeping <john@keeping.me.uk>

Acked-by: Sverre Rabbelier <srabbelier@gmail.com>

--
Cheers,

Sverre Rabbelier

```

## Felipe Contreras, 2013-04-17 22:30

Subject: Re: [PATCH] gitremote-helpers(1): clarify refspec behaviour
Message-ID: <CAMP44s38Cqcr4mwDBexW4tHzv3BKffCYEn5oN0U6Wji10nmJMw@mail.gmail.com>
URL: https://gitlist.dev/e/CAMP44s38Cqcr4mwDBexW4tHzv3BKffCYEn5oN0U6Wji10nmJMw%40mail.gmail.com
In-Reply-To: <505914600ac7f4afc26f8b29fbece26156c87519.1365272021.git.john@keeping.me.uk>

```
On Sat, Apr 6, 2013 at 12:13 PM, John Keeping <john@keeping.me.uk> wrote:

> --- 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 no 'refspec' capability is advertised,
> -there is an implied `refspec *:*`.
> +the list command.  If a helper does not need a specific 'refspec'
> +capability then it should advertise `refspec *:*`.

But if it advertises a straight 'refspec *:*', nothing would work. If
anything, it should be 'refs/heads/*:refs/remotes/$alias/*', but then
tags would fail. Why not just tell the remote helpers to do the right
thing and avoid this comment altogether?

-- 
Felipe Contreras

```
