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