Merge branch 'sb/remove-gitview'
[gitweb.git] / git-p4.py
index 22e3f57e7d93783ef6bb3f0bfd4ef2f6bbd0f93f..7bda915bd0c9af438d7303abaabf53fc15f9a5dd 100755 (executable)
--- a/git-p4.py
+++ b/git-p4.py
@@ -83,7 +83,9 @@ def p4_build_cmd(cmd):
     if retries is None:
         # Perform 3 retries by default
         retries = 3
-    real_cmd += ["-r", str(retries)]
+    if retries > 0:
+        # Provide a way to not pass this option by setting git-p4.retries to 0
+        real_cmd += ["-r", str(retries)]
 
     if isinstance(cmd,basestring):
         real_cmd = ' '.join(real_cmd) + ' ' + cmd