Commit 6aba9c6
scalar: add retry logic to run_git()
Use a fixed 3 tries total to see how that increases our chances of
success for subcommands such as 'git fetch'.
We special-case the `diagnose` command here: When 672196a
(scalar-diagnose: use 'git diagnose --mode=all', 2022-08-12) updated
'scalar diagnose' to run 'git diagnose' as a subprocess, it was passed
through the run_git() caller. We need to avoid repeating the call when
the underlying 'git diagnose' command fails.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>1 parent 2501a2f commit 6aba9c6
1 file changed
Lines changed: 20 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
83 | 84 | | |
84 | 85 | | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | | - | |
| 90 | + | |
88 | 91 | | |
89 | | - | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | | - | |
93 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
94 | 107 | | |
95 | 108 | | |
96 | 109 | | |
| |||
620 | 633 | | |
621 | 634 | | |
622 | 635 | | |
| 636 | + | |
| 637 | + | |
623 | 638 | | |
624 | 639 | | |
625 | 640 | | |
| |||
0 commit comments