title: Git pull hangs randomly
body: <p>When using git on windows normally (such as <code>git push</code> and <code>git pull</code>), it will sometimes be very slow. Running <code>git pull</code> over and over again returns within two seconds most of the time, but about 1/6 of attempts take about a minute.</p>
  
  <p>I have set <code>git config --global core.preloadindex</code> and <code>git config --global core.fscache</code> to true.</p>
  
  <p>Examples after running <code>set GIT_TRACE=1</code></p>
  
  <p>Slow:</p>
  
  <pre><code>$ git pull
  14:11:03.166594 git.c:371               trace: built-in: git 'pull'
  14:11:03.168594 run-command.c:350       trace: run_command: 'fetch' '--update-head-ok'
  14:11:03.186596 git.c:371               trace: built-in: git 'fetch' '--update-head-ok'
  14:11:03.189596 run-command.c:350       trace: run_command: 'git-remote-https' 'origin' 'https://[...].git'
  14:11:03.204598 run-command.c:350       trace: run_command: 'git credential-manager get'
  14:11:46.400917 git.c:607               trace: exec: 'git-credential-manager' 'get'
  14:11:46.400917 run-command.c:350       trace: run_command: 'git-credential-manager' 'get'
  14:11:47.828059 run-command.c:350       trace: run_command: 'git credential-manager store'
  14:11:47.869064 git.c:607               trace: exec: 'git-credential-manager' 'store'
  14:11:47.869064 run-command.c:350       trace: run_command: 'git-credential-manager' 'store'
  14:11:47.980075 run-command.c:350       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
  14:11:47.991076 run-command.c:350       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
  14:11:47.999077 git.c:371               trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
  14:11:48.005077 run-command.c:1130      run_processes_parallel: preparing to run up to 1 tasks
  14:11:48.005077 run-command.c:1162      run_processes_parallel: done
  14:11:48.005077 run-command.c:350       trace: run_command: 'gc' '--auto'
  14:11:48.014078 git.c:371               trace: built-in: git 'gc' '--auto'
  14:11:48.017078 run-command.c:350       trace: run_command: 'merge' 'FETCH_HEAD'
  14:11:48.025079 git.c:371               trace: built-in: git 'merge' 'FETCH_HEAD'
  Already up-to-date.
  </code></pre>
  
  <p>Fast:</p>
  
  <pre><code>$ git pull
  14:12:25.432820 git.c:371               trace: built-in: git 'pull'
  14:12:25.434820 run-command.c:350       trace: run_command: 'fetch' '--update-head-ok'
  14:12:25.451821 git.c:371               trace: built-in: git 'fetch' '--update-head-ok'
  14:12:25.454822 run-command.c:350       trace: run_command: 'git-remote-https' 'origin' 'https://[...].git'
  14:12:25.472824 run-command.c:350       trace: run_command: 'git credential-manager get'
  14:12:25.497826 git.c:607               trace: exec: 'git-credential-manager' 'get'
  14:12:25.497826 run-command.c:350       trace: run_command: 'git-credential-manager' 'get'
  14:12:26.904967 run-command.c:350       trace: run_command: 'git credential-manager store'
  14:12:26.941970 git.c:607               trace: exec: 'git-credential-manager' 'store'
  14:12:26.941970 run-command.c:350       trace: run_command: 'git-credential-manager' 'store'
  14:12:27.050981 run-command.c:350       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
  14:12:27.060982 run-command.c:350       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
  14:12:27.068983 git.c:371               trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
  14:12:27.074984 run-command.c:1130      run_processes_parallel: preparing to run up to 1 tasks
  14:12:27.074984 run-command.c:1162      run_processes_parallel: done
  14:12:27.074984 run-command.c:350       trace: run_command: 'gc' '--auto'
  14:12:27.082985 git.c:371               trace: built-in: git 'gc' '--auto'
  14:12:27.085985 run-command.c:350       trace: run_command: 'merge' 'FETCH_HEAD'
  14:12:27.092986 git.c:371               trace: built-in: git 'merge' 'FETCH_HEAD'
  Already up-to-date.
  </code></pre>
  
  <p>Edit:</p>
  
  <p>After running <code>git config --global credential.helper ""</code> the lines in output containing <code>credential-manager</code> are replaced by:</p>
  
  <pre><code>17:18:44.139589 run-command.c:350       trace: run_command: 'bash' '-c' 'cat &gt;/dev/tty &amp;&amp; read -r -s line &lt;/dev/tty &amp;&amp; echo "$line" &amp;&amp; echo &gt;/dev/tty'
  Password for 'https://[...]':
  </code></pre>
  
  <p>A delay occurs sometimes right before the Password line is displayed, with the same duration and frequency (as far as I can tell, from about 20 tests) as before.</p>