summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subcmds/sync.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 2e92584e..02cd3879 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -436,7 +436,7 @@ later is required to fix a server side protocol bug.
436 bare_git.gc('--auto') 436 bare_git.gc('--auto')
437 return 437 return
438 438
439 config = {'pack.threads': cpu_count / jobs if cpu_count > jobs else 1} 439 config = {'pack.threads': cpu_count // jobs if cpu_count > jobs else 1}
440 440
441 threads = set() 441 threads = set()
442 sem = _threading.Semaphore(jobs) 442 sem = _threading.Semaphore(jobs)
@@ -598,7 +598,7 @@ later is required to fix a server side protocol bug.
598 self.jobs = opt.jobs 598 self.jobs = opt.jobs
599 if self.jobs > 1: 599 if self.jobs > 1:
600 soft_limit, _ = _rlimit_nofile() 600 soft_limit, _ = _rlimit_nofile()
601 self.jobs = min(self.jobs, (soft_limit - 5) / 3) 601 self.jobs = min(self.jobs, (soft_limit - 5) // 3)
602 602
603 if opt.network_only and opt.detach_head: 603 if opt.network_only and opt.detach_head:
604 print('error: cannot combine -n and -d', file=sys.stderr) 604 print('error: cannot combine -n and -d', file=sys.stderr)