Commit c0e413e
committed
pkg/vcs: don't re-clone on network errors
There's no sense to react to `git checkout` or `git fetch` which failed
due to network problems by re-cloning the whole repository - that
operation will fail just as well.
Detect at least one kind of such problems and just return an error from
the Poll() method, without wiping everything out.
For now, don't add tests as we would need some real remote git server
implementation to properly test it. Using a folder as a "remote"
repository, like we do in other tests, won't ever trigger networking
errors.
Closes #6099.1 parent b07d761 commit c0e413e
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
| |||
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
102 | 110 | | |
103 | 111 | | |
104 | 112 | | |
| |||
0 commit comments