Commit 9ebb277
committed
git: make shallow clones with explicit commits more reliable
On a shallow clone the fetched tip(s) are only partially cloned. If the
scm is configured to use a specific commit it might be possible that the
commit was not downloaded if the branch advanced too much. Add a special
fallback to re-fetch from the server with the explicit commit id if the
initial fetch failed to download the required commit.
Note that we cannot just always request the commit explicitly when
fetching. Servers are usually configured to *not* hand out arbitrary
commits.1 parent da27c3c commit 9ebb277
1 file changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
185 | 201 | | |
186 | 202 | | |
187 | 203 | | |
| |||
0 commit comments