Stop using git count-objects and use raw directory size for repository (#8848)
* Migrate from git count-objects to a raw directory size * As per @guillep2k ignore unusual files
This commit is contained in:
parent
44ec9b933a
commit
ee1d64ddd1
4 changed files with 26 additions and 8 deletions
|
@ -304,8 +304,8 @@ const (
|
|||
statSizeGarbage = "size-garbage: "
|
||||
)
|
||||
|
||||
// GetRepoSize returns disk consumption for repo in path
|
||||
func GetRepoSize(repoPath string) (*CountObject, error) {
|
||||
// CountObjects returns the results of git count-objects on the repoPath
|
||||
func CountObjects(repoPath string) (*CountObject, error) {
|
||||
cmd := NewCommand("count-objects", "-v")
|
||||
stdout, err := cmd.RunInDir(repoPath)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue