diff options
| -rw-r--r-- | project.py | 11 |
1 files changed, 11 insertions, 0 deletions
| @@ -2659,6 +2659,17 @@ class Project: | |||
| 2659 | # Fallthru to sleep+retry logic at the bottom. | 2659 | # Fallthru to sleep+retry logic at the bottom. |
| 2660 | pass | 2660 | pass |
| 2661 | 2661 | ||
| 2662 | # TODO(b/360889369#comment24): git may gc commits incorrectly. | ||
| 2663 | # Until the root cause is fixed, retry fetch with --refetch which | ||
| 2664 | # will bring the repository into a good state. | ||
| 2665 | elif gitcmd.stdout and "could not parse commit" in gitcmd.stdout: | ||
| 2666 | cmd.insert(1, "--refetch") | ||
| 2667 | print( | ||
| 2668 | "could not parse commit error, retrying with refetch", | ||
| 2669 | file=output_redir, | ||
| 2670 | ) | ||
| 2671 | continue | ||
| 2672 | |||
| 2662 | # Try to prune remote branches once in case there are conflicts. | 2673 | # Try to prune remote branches once in case there are conflicts. |
| 2663 | # For example, if the remote had refs/heads/upstream, but deleted | 2674 | # For example, if the remote had refs/heads/upstream, but deleted |
| 2664 | # that and now has refs/heads/upstream/foo. | 2675 | # that and now has refs/heads/upstream/foo. |
