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 <peterosterlund2@gmail.com> Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Peter Osterlund committed
Jan 7, 2019 at 21:51 UTC
d4990d56a8dd64667df9daa5eedb8134ccc4356f
1 file changed
+2
git-p4.py
+2
@@ -332,6 +332,8 @@ def p4_check_access(min_expiration=1):
332
die_bad_access("p4 error: {0}".format(data))
333
else:
334
die_bad_access("unknown error")
335
+ elif code == "info":
336
+ return
337
else:
338
die_bad_access("unknown error code {0}".format(code))
339