summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorPeter Osterlund <peterosterlund2@gmail.com>2019-01-07 21:51:38 +0100
committerJunio C Hamano <gitster@pobox.com>2019-01-07 14:23:22 -0800
commitd4990d56a8dd64667df9daa5eedb8134ccc4356f (patch)
tree78ffd98de898262d01f88b7050e0710df8b4ff91 /git-p4.py
parent0d0ac3826a3bbb9247e39e12623bbcfdd722f24c (diff)
downloadgit-d4990d56a8dd64667df9daa5eedb8134ccc4356f.tar.gz
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>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py2
1 files changed, 2 insertions, 0 deletions
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))