fix(worktree): match object-not-found by message too, as push transports may flatten it (#1843)
This commit is contained in:
1 file changed
+1
-1
@@ -717,7 +717,7 @@ func (m *Manager) push(ctx context.Context, dir, branch, remoteURL string) error
|
||||
})
|
||||
}
|
||||
err = publish()
|
||||
if errors.Is(err, plumbing.ErrObjectNotFound) {
|
||||
if errors.Is(err, plumbing.ErrObjectNotFound) || strings.Contains(err.Error(), plumbing.ErrObjectNotFound.Error()) {
|
||||
// The clone borrows objects from the shared mirror; a damaged mirror
|
||||
// loses them. The forge still has every base object, so rebuild it.
|
||||
m.logger().WarnContext(ctx, "push hit a missing object, rebuilding the mirror", "branch", branch, "err", err)
|
||||
|
||||
Reference in new issue
Block a user