mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-02-22 02:06:11 +00:00
project: run fetch --refetch on unable to not parse commit
Similarly to e59e2ae757623e64f625a9cdadf1c2010ef82b34, handle missing gc'ed commits by running `git fetch --refetch`. R=jojwang@google.com Bug: b/360889369 Bug: b/371000949 Change-Id: I108b870b855d3b9f23665afa134c6e35f7cd2830 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/438461 Reviewed-by: Joanna Wang <jojwang@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This commit is contained in:
parent
621de7ed12
commit
cfe3095e50
@ -2664,7 +2664,10 @@ class Project:
|
||||
# TODO(b/360889369#comment24): git may gc commits incorrectly.
|
||||
# Until the root cause is fixed, retry fetch with --refetch which
|
||||
# will bring the repository into a good state.
|
||||
elif gitcmd.stdout and "could not parse commit" in gitcmd.stdout:
|
||||
elif gitcmd.stdout and (
|
||||
"could not parse commit" in gitcmd.stdout
|
||||
or "unable to parse commit" in gitcmd.stdout
|
||||
):
|
||||
cmd.insert(1, "--refetch")
|
||||
print(
|
||||
"could not parse commit error, retrying with refetch",
|
||||
|
Loading…
x
Reference in New Issue
Block a user