git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git-p4: fix problem when p4 login is not necessary
@ 2019-01-07 20:51 Peter Osterlund
  2019-01-07 22:05 ` Luke Diamand
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Osterlund @ 2019-01-07 20:51 UTC (permalink / raw)
  To: Git Users; +Cc: gitster, Luke Diamand

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>
---
  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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-07 22:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 20:51 [PATCH] git-p4: fix problem when p4 login is not necessary Peter Osterlund
2019-01-07 22:05 ` Luke Diamand
2019-01-07 22:24   ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).