From: Peter Osterlund Date: Mon, 7 Jan 2019 20:51:38 +0000 (+0100) Subject: git-p4: fix problem when p4 login is not necessary X-Git-Tag: v2.21.0-rc0~83^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4990d56a8dd64667df9daa5eedb8134ccc4356f;p=thirdparty%2Fgit.git 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 Acked-by: Luke Diamand Signed-off-by: Junio C Hamano --- 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))