Commit Graph

7 Commits

Author SHA1 Message Date
Sam Dowell 00e00f019f fix: gracefully handle nil err in Logger
This handles the case where a null error is passed into the Logger
without causing a null pointer dereference / segfault. There are
currently a couple places that invoke this function with a nil error and
were resulting in a segfault.
2025-06-16 10:04:58 -07:00
Tim Hockin 913a6be647 Bump go and golangci-lint versions, fix lint 2025-03-24 13:43:12 -07:00
Tim Hockin d197740d85 Exercise the git "dubious ownership" path
To do this, we run the e2e test as a different user.  To do that, we
need git-sync to make sure that everything is group accessible.  To
clean up after the test, we need everything to be group writable.  To do
that, we add a new flag: `--group-write`.
2023-05-07 10:29:39 -07:00
Eng Zer Jun 91113aa314
refactor: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

[1]: https://golang.org/doc/go1.16#ioutil
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-11-04 20:34:57 +08:00
Tim Hockin 4603f559f3 Replace glogr with funcr
No difference in flags.  Log output will now be JSON.

example:

{"logger":"","ts":"2021-11-24 11:19:46.340238","caller":{"file":"main.go","line":1031},"level":0,"msg":"cloning repo","origin":"https://github.com/thockin/git-sync","path":"/tmp/gt"}
2021-11-24 11:18:07 -08:00
Tim Hockin 0ea10cbbc2 Add one call depth to compensate for log pkg 2021-08-16 23:45:10 -07:00
Tim Hockin 0075df238c Make exechooks work like webhooks.
This deprecates the `--sync-hook-command` flag in favor of
`--exechook-command`, `--exechook-timeout`, and `--exechook-backoff`.
2021-08-16 23:21:20 -07:00