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

Re: [PATCH] git-p4: fix problem when p4 login is not necessary

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 7, 2019, 22:24 UTC
Message-ID
<xmqqlg3w6r8d.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAE5ih7-qFrYXfsWr6MebSFBtDERLKGf0zb73yaV6Eit4PJHcJA@mail.gmail.com>
Luke Diamand <luke@diamand.org> writes:
Show 33 quoted lines
> On Mon, 7 Jan 2019 at 20:51, Peter Osterlund <peterosterlund2@gmail.com> wrote:
>>
>> In a perforce setup where login is not required, communication fails
>> because p4_check_access does not understand the response from the p4
>> client. Fixed by detecting and ignoring the "info" response.
>
> This is caused by my earlier change in this area. I think this fix
> looks good, thanks.
> Ack.
>
>>
>> Signed-off-by: Peter Osterlund <peterosterlund2@gmail.com>
>> ---
>>   git-p4.py | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/git-p4.py b/git-p4.py
>> index 1998c3e141..3e12774f96 100755
>> --- a/git-p4.py
>> +++ b/git-p4.py
>> @@ -332,6 +332,8 @@ def p4_check_access(min_expiration=1):
>>               die_bad_access("p4 error: {0}".format(data))
>>           else:
>>               die_bad_access("unknown error")
>> +    elif code == "info":
>> +        return
>>       else:
>>           die_bad_access("unknown error code {0}".format(code))
>>
>>
>> --
>> Peter Osterlund - peterosterlund2@gmail.com
>> http://hem.bredband.net/petero2b

The patch was whitespace damaged, but for a two-liner like this, I can type it myself instead, so no need to resend.

Thanks, both.
Previous: Luke Diamand
Message 3 of 3 in “git-p4: fix problem when p4 login is not necessary”
  1. git-p4: fix problem when p4 login is not necessaryPeter Osterlund, Jan 7, 2019
  2. Luke DiamandJan 7, 2019
  3. Junio C HamanoJan 7, 2019

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.