mirror of https://github.com/harness/drone.git
Temporarily comment out file size check (#2040)
parent
ea49937a1e
commit
8049651963
|
@ -93,13 +93,18 @@ func (c *Controller) PreReceive(
|
|||
return hook.Output{}, fmt.Errorf("failed to extend pre-receive hook: %w", err)
|
||||
}
|
||||
|
||||
err = c.checkFileSizeLimit(ctx, rgit, repo, in, &output)
|
||||
if output.Error != nil {
|
||||
return output, nil
|
||||
}
|
||||
if err != nil {
|
||||
return hook.Output{}, err
|
||||
}
|
||||
// File size check currently checks all the blobs in alternate as well in the original repo dirs.
|
||||
// We want to check file size only in alternate dirs.
|
||||
// Temporarily comment out file size check until the solution is found.
|
||||
// TODO: find the way to check the blob size only in alternate dirs.
|
||||
|
||||
// err = c.checkFileSizeLimit(ctx, rgit, repo, in, &output)
|
||||
// if output.Error != nil {
|
||||
// return output, nil
|
||||
// }
|
||||
// if err != nil {
|
||||
// return hook.Output{}, err
|
||||
// }
|
||||
|
||||
return output, nil
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import (
|
|||
"github.com/gotidy/ptr"
|
||||
)
|
||||
|
||||
// nolint:unused
|
||||
func (c *Controller) checkFileSizeLimit(
|
||||
ctx context.Context,
|
||||
rgit RestrictedGIT,
|
||||
|
|
|
@ -104,6 +104,7 @@ func FMTDuration(d time.Duration) string {
|
|||
return d.String()
|
||||
}
|
||||
|
||||
// nolint:unused
|
||||
func printOversizeFiles(
|
||||
output *hook.Output,
|
||||
oversizeFiles []git.FileInfo,
|
||||
|
|
Loading…
Reference in New Issue