Skip to content

Commit d4990d5

Browse files
peterosterlund2gitster
authored andcommitted
git-p4: fix problem when p4 login is not necessary
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. Signed-off-by: Peter Osterlund <[email protected]> Acked-by: Luke Diamand <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0d0ac38 commit d4990d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

git-p4.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ def p4_check_access(min_expiration=1):
332332
die_bad_access("p4 error: {0}".format(data))
333333
else:
334334
die_bad_access("unknown error")
335+
elif code == "info":
336+
return
335337
else:
336338
die_bad_access("unknown error code {0}".format(code))
337339

0 commit comments

Comments
 (0)