Skip to content

Commit 2cf8fba

Browse files
committed
Use shallow clone to optimize rule repository fetch.
Added the `--depth 1` flag to the `git clone` command to reduce the clone size and download time by fetching only the latest commit. This improves performance and minimizes unnecessary data transfer.
1 parent d597571 commit 2cf8fba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

correlation/rules/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func Update(updateReady chan bool) {
2929
}
3030
}
3131

32-
err = utils.RunCommand("git", "clone", "https://github.com/utmstack/rules.git", cnf.RulesFolder+"system")
32+
err = utils.RunCommand("git", "clone", "--depth", "1", "https://github.com/utmstack/rules.git", cnf.RulesFolder+"system")
3333
if err != nil {
3434
log.Fatalf("Could not clone rules: %v", err)
3535
}

0 commit comments

Comments
 (0)