[PATCH 6/7] pack-protocol.txt: Mark pushee field as optional

2015-07-01 Thread Dave Borowitz
send-pack.c omits this field when args-url is null or empty. Fix the
protocol specification to match reality.

Signed-off-by: Dave Borowitz dborow...@google.com
---
 Documentation/technical/pack-protocol.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/technical/pack-protocol.txt 
b/Documentation/technical/pack-protocol.txt
index f37dcf1..98e512d 100644
--- a/Documentation/technical/pack-protocol.txt
+++ b/Documentation/technical/pack-protocol.txt
@@ -495,7 +495,7 @@ references.
   push-cert = PKT-LINE(push-cert NUL capability-list LF)
  PKT-LINE(certificate version 0.1 LF)
  PKT-LINE(pusher SP push-cert-ident LF)
- PKT-LINE(pushee SP url LF)
+ [PKT-LINE(pushee SP url LF)]
  PKT-LINE(nonce SP nonce LF)
  PKT-LINE(LF)
  *PKT-LINE(command LF)
@@ -554,7 +554,8 @@ Currently, the following header fields are defined:
 `pushee` url::
The repository URL (anonymized, if the URL contains
authentication material) the user who ran `git push`
-   intended to push into.
+   intended to push into. This field is optional, and included at
+   the client's discretion.
 
 `nonce` nonce::
The 'nonce' string the receiving repository asked the
-- 
2.4.3.573.g4eafbef

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 6/7] pack-protocol.txt: Mark pushee field as optional

2015-07-01 Thread Junio C Hamano
Dave Borowitz dborow...@google.com writes:

 send-pack.c omits this field when args-url is null or empty. Fix the
 protocol specification to match reality.

Do some clients omit this in the real world?

As you say, send_pack() does omit it if args-url is null or empty,
but args is prepared in transport.c as a copy of transport-url when
the function is called, and that transport-url is how
builtin/push.c reports where it is pushing with:

   if (verbosity  0)
   fprintf(stderr, _(Pushing to %s\n), transport-url);

So I am somewhat puzzled...


 Signed-off-by: Dave Borowitz dborow...@google.com
 ---
  Documentation/technical/pack-protocol.txt | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

 diff --git a/Documentation/technical/pack-protocol.txt 
 b/Documentation/technical/pack-protocol.txt
 index f37dcf1..98e512d 100644
 --- a/Documentation/technical/pack-protocol.txt
 +++ b/Documentation/technical/pack-protocol.txt
 @@ -495,7 +495,7 @@ references.
push-cert = PKT-LINE(push-cert NUL capability-list LF)
 PKT-LINE(certificate version 0.1 LF)
 PKT-LINE(pusher SP push-cert-ident LF)
 -   PKT-LINE(pushee SP url LF)
 +   [PKT-LINE(pushee SP url LF)]
 PKT-LINE(nonce SP nonce LF)
 PKT-LINE(LF)
 *PKT-LINE(command LF)
 @@ -554,7 +554,8 @@ Currently, the following header fields are defined:
  `pushee` url::
   The repository URL (anonymized, if the URL contains
   authentication material) the user who ran `git push`
 - intended to push into.
 + intended to push into. This field is optional, and included at
 + the client's discretion.
  
  `nonce` nonce::
   The 'nonce' string the receiving repository asked the
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 6/7] pack-protocol.txt: Mark pushee field as optional

2015-07-01 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes:

 Junio C Hamano gits...@pobox.com writes:

 Dave Borowitz dborow...@google.com writes:

 send-pack.c omits this field when args-url is null or empty. Fix the
 protocol specification to match reality.

 Do some clients omit this in the real world?

 As you say, send_pack() does omit it if args-url is null or empty,
 but args is prepared in transport.c as a copy of transport-url when
 the function is called, and that transport-url is how
 builtin/push.c reports where it is pushing with:

if (verbosity  0)
fprintf(stderr, _(Pushing to %s\n), transport-url);

 So I am somewhat puzzled...

 Answering myself, the most trivial example is git send-pack ;-)
 It passes args that has a NULL in the .url field.

... which may be something we want to fix, but that does not mean
the field is mandatory, as we have implementations in the field that
do not send it ;-)

The patch looks good.

Thanks.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 6/7] pack-protocol.txt: Mark pushee field as optional

2015-07-01 Thread Dave Borowitz
On Wed, Jul 1, 2015 at 12:07 PM, Junio C Hamano gits...@pobox.com wrote:
 Answering myself, the most trivial example is git send-pack ;-)
 It passes args that has a NULL in the .url field.

Well, the example I have involves an actual git push command. The
fact that .url is NULL in that case may be a separate bug.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 6/7] pack-protocol.txt: Mark pushee field as optional

2015-07-01 Thread Dave Borowitz
On Wed, Jul 1, 2015 at 11:56 AM, Junio C Hamano gits...@pobox.com wrote:
 Do some clients omit this in the real world?

I just sent you privately a trace where this happens using a recent
git client. With that in the wild, I think our server is going to have
to handle these even if there is a bug and it is fixed promptly.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 6/7] pack-protocol.txt: Mark pushee field as optional

2015-07-01 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes:

 Dave Borowitz dborow...@google.com writes:

 send-pack.c omits this field when args-url is null or empty. Fix the
 protocol specification to match reality.

 Do some clients omit this in the real world?

 As you say, send_pack() does omit it if args-url is null or empty,
 but args is prepared in transport.c as a copy of transport-url when
 the function is called, and that transport-url is how
 builtin/push.c reports where it is pushing with:

if (verbosity  0)
fprintf(stderr, _(Pushing to %s\n), transport-url);

 So I am somewhat puzzled...

Answering myself, the most trivial example is git send-pack ;-)
It passes args that has a NULL in the .url field.

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html