Skip to content

Commit

Permalink
hack
Browse files Browse the repository at this point in the history
  • Loading branch information
thockin committed Jun 9, 2024
1 parent 12a7d9c commit 5d04418
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3,060 deletions.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,9 @@ func main() {
updateSyncMetrics(metricKeyError, start)
if *flMaxFailures >= 0 && failCount >= *flMaxFailures {
// Exit after too many retries, maybe the error is not recoverable.
git.run.WithCallDepth(1).Run(ctx, git.root.String(), nil, "ls", "-lran")

Check failure on line 833 in main.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `(k8s.io/git-sync/pkg/cmd.Runner).Run` is not checked (errcheck)
git.run.WithCallDepth(1).Run(ctx, git.root.String(), nil, "git", "config", "get", "safe.directory")

Check failure on line 834 in main.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `(k8s.io/git-sync/pkg/cmd.Runner).Run` is not checked (errcheck)
git.run.WithCallDepth(1).Run(ctx, git.root.String(), nil, "git", "config", "list")

Check failure on line 835 in main.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `(k8s.io/git-sync/pkg/cmd.Runner).Run` is not checked (errcheck)
log.Error(err, "too many failures, aborting", "failCount", failCount)
os.Exit(1)
}
Expand Down Expand Up @@ -1916,7 +1919,7 @@ func (git *repoSync) SetupDefaultGitConfigs(ctx context.Context) error {
}, {
// Mark repos as safe (avoid a "dubious ownership" error).
key: "safe.directory",
val: "*",
val: "/git/repo/.git",
}}

for _, kv := range configs {
Expand Down
Loading

0 comments on commit 5d04418

Please sign in to comment.