Commit db111d3
sync: Recover from errors during read-tree
When repo is initializing a git repository, it calls `git read-tree`.
During such operation, git is restoring workspace based on the current
index. However, some things can go wrong: a user can run out of disk
space, or, in case of partial clone, user may no longer reach the remote
host. That will leave affected repository in a bad state with partially
checked out workspace. The follow up repo sync won't try to fix such
state.
This change removes .git symlink, which will force the next `repo sync`
to redo Git repository setup.
Bug: b/363171216
Bug: b/390161127
Change-Id: I57db4b6cae0ef21826dc7cede4d3bf02cfc3d955
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/447801
Reviewed-by: Scott Lee <[email protected]>
Tested-by: Josip Sokcevic <[email protected]>
Commit-Queue: Josip Sokcevic <[email protected]>1 parent 3405446 commit db111d3
1 file changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3443 | 3443 | | |
3444 | 3444 | | |
3445 | 3445 | | |
3446 | | - | |
3447 | | - | |
3448 | | - | |
3449 | | - | |
3450 | | - | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
3451 | 3458 | | |
3452 | 3459 | | |
3453 | 3460 | | |
| |||
0 commit comments