{"thread":{"id":"50174","subject":"[PATCH] git-p4: fix problem when p4 login is not necessary","startedAt":"2019-01-07T20:51:47Z","lastAt":"2019-01-07T22:24:38Z","messageCount":3,"participants":["Peter Osterlund","Luke Diamand","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"366287","messageId":"alpine.LFD.2.21.1901072148380.20807@fractal.localdomain","threadId":"50174","inReplyTo":null,"subject":"[PATCH] git-p4: fix problem when p4 login is not necessary","fromName":"Peter Osterlund","fromEmail":"peterosterlund2@gmail.com","sentAt":"2019-01-07T20:51:38Z","receivedAt":"2019-01-07T20:51:47Z","isPatch":true,"sender":{"key":"peterosterlund2@gmail.com","avatar":null},"body":"In a perforce setup where login is not required, communication fails \nbecause p4_check_access does not understand the response from the p4 \nclient. Fixed by detecting and ignoring the \"info\" response.\n\nSigned-off-by: Peter Osterlund <peterosterlund2@gmail.com>\n---\n  git-p4.py | 2 ++\n  1 file changed, 2 insertions(+)\n\ndiff --git a/git-p4.py b/git-p4.py\nindex 1998c3e141..3e12774f96 100755\n--- a/git-p4.py\n+++ b/git-p4.py\n@@ -332,6 +332,8 @@ def p4_check_access(min_expiration=1):\n              die_bad_access(\"p4 error: {0}\".format(data))\n          else:\n              die_bad_access(\"unknown error\")\n+    elif code == \"info\":\n+        return\n      else:\n          die_bad_access(\"unknown error code {0}\".format(code))\n\n\n-- \nPeter Osterlund - peterosterlund2@gmail.com\nhttp://hem.bredband.net/petero2b\n"},{"id":"366292","messageId":"CAE5ih7-qFrYXfsWr6MebSFBtDERLKGf0zb73yaV6Eit4PJHcJA@mail.gmail.com","threadId":"50174","inReplyTo":"alpine.LFD.2.21.1901072148380.20807@fractal.localdomain","subject":"Re: [PATCH] git-p4: fix problem when p4 login is not necessary","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2019-01-07T22:05:32Z","receivedAt":"2019-01-07T22:05:46Z","isPatch":true,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On Mon, 7 Jan 2019 at 20:51, Peter Osterlund <peterosterlund2@gmail.com> wrote:\n>\n> In a perforce setup where login is not required, communication fails\n> because p4_check_access does not understand the response from the p4\n> client. Fixed by detecting and ignoring the \"info\" response.\n\nThis is caused by my earlier change in this area. I think this fix\nlooks good, thanks.\nAck.\n\n>\n> Signed-off-by: Peter Osterlund <peterosterlund2@gmail.com>\n> ---\n>   git-p4.py | 2 ++\n>   1 file changed, 2 insertions(+)\n>\n> diff --git a/git-p4.py b/git-p4.py\n> index 1998c3e141..3e12774f96 100755\n> --- a/git-p4.py\n> +++ b/git-p4.py\n> @@ -332,6 +332,8 @@ def p4_check_access(min_expiration=1):\n>               die_bad_access(\"p4 error: {0}\".format(data))\n>           else:\n>               die_bad_access(\"unknown error\")\n> +    elif code == \"info\":\n> +        return\n>       else:\n>           die_bad_access(\"unknown error code {0}\".format(code))\n>\n>\n> --\n> Peter Osterlund - peterosterlund2@gmail.com\n> http://hem.bredband.net/petero2b\n"},{"id":"366295","messageId":"xmqqlg3w6r8d.fsf@gitster-ct.c.googlers.com","threadId":"50174","inReplyTo":"CAE5ih7-qFrYXfsWr6MebSFBtDERLKGf0zb73yaV6Eit4PJHcJA@mail.gmail.com","subject":"Re: [PATCH] git-p4: fix problem when p4 login is not necessary","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-07T22:24:34Z","receivedAt":"2019-01-07T22:24:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luke Diamand <luke@diamand.org> writes:\n\n> On Mon, 7 Jan 2019 at 20:51, Peter Osterlund <peterosterlund2@gmail.com> wrote:\n>>\n>> In a perforce setup where login is not required, communication fails\n>> because p4_check_access does not understand the response from the p4\n>> client. Fixed by detecting and ignoring the \"info\" response.\n>\n> This is caused by my earlier change in this area. I think this fix\n> looks good, thanks.\n> Ack.\n>\n>>\n>> Signed-off-by: Peter Osterlund <peterosterlund2@gmail.com>\n>> ---\n>>   git-p4.py | 2 ++\n>>   1 file changed, 2 insertions(+)\n>>\n>> diff --git a/git-p4.py b/git-p4.py\n>> index 1998c3e141..3e12774f96 100755\n>> --- a/git-p4.py\n>> +++ b/git-p4.py\n>> @@ -332,6 +332,8 @@ def p4_check_access(min_expiration=1):\n>>               die_bad_access(\"p4 error: {0}\".format(data))\n>>           else:\n>>               die_bad_access(\"unknown error\")\n>> +    elif code == \"info\":\n>> +        return\n>>       else:\n>>           die_bad_access(\"unknown error code {0}\".format(code))\n>>\n>>\n>> --\n>> Peter Osterlund - peterosterlund2@gmail.com\n>> http://hem.bredband.net/petero2b\n\nThe patch was whitespace damaged, but for a two-liner like this, I\ncan type it myself instead, so no need to resend.\n\nThanks, both.\n"}]}