forgejo/modules
forgejo-backport-action 9f80081795 [v7.0/forgejo] [REFACTOR] git attribute: test proper cancellation and unify nul-byte reader (#2939)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/2906

Following #2763 (refactor of git check-attr)
and #2866 (wrong log.Error format in check-attr)

- refactors the `nul-byte` reader to be used in both the streaming and one-off cases.
- add test for some failure cases
- don't log the error returned by `cmd.Run`, but return it to the `CheckPath` caller (which can then decide what to do with it).

This should solve the following flaky `log.Error` (or at least move it to the caller, instead of being inside a random goroutine):

https://codeberg.org/forgejo/forgejo/actions/runs/9541/jobs/5#jobstep-7-839

> FATAL ERROR: log.Error has been called: 2024/03/28 14:30:33 ...it/repo_attribute.go:313:func2() [E] Unable to open checker for 3fa2f829675543ecfc16b2891aebe8bf0608a8f4. Error: failed to run attr-check. Error: exit status 128
        Stderr: fatal: this operation must be run in a work tree

Co-authored-by: oliverpool <git@olivier.pfad.fr>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2939
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2024-04-01 06:44:46 +00:00
..
actions Merge pull request '[ACTIONS] port scheduled actions from Gitea' (#2826) from earl-warren/forgejo:wip-gitea-schedule into forgejo 2024-03-27 06:23:56 +00:00
activitypub Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
analyze Rename code_langauge.go to code_language.go (#26377) 2023-08-07 15:00:53 -04:00
assetfs Use Set[Type] instead of map[Type]bool/struct{}. (#26804) 2023-08-30 06:55:25 +00:00
auth Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
avatar [GITEA] Drop sha256-simd in favor of stdlib 2024-02-05 16:09:40 +01:00
base Refactor StringsToInt64s (#29967) 2024-03-26 19:04:26 +01:00
cache Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
charset [FEAT] Enable ambiguous character detection in configured contexts 2024-02-23 13:12:17 +01:00
container Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
csv Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
emoji Update emoji set to Unicode 15 (#25595) 2023-06-29 16:29:48 +00:00
eventsource Final round of db.DefaultContext refactor (#27587) 2023-10-14 08:37:24 +00:00
generate Port "Use general token signing secret" 2024-02-19 20:49:37 +01:00
git [v7.0/forgejo] [REFACTOR] git attribute: test proper cancellation and unify nul-byte reader (#2939) 2024-04-01 06:44:46 +00:00
gitgraph More db.DefaultContext refactor (#27265) 2023-09-29 12:12:54 +00:00
gitrepo Move get/set default branch from git package to gitrepo package to hide repopath (#29126) 2024-03-11 23:36:59 +07:00
graceful Remove unused error in graceful manager (#29871) 2024-03-26 19:04:25 +01:00
hcaptcha Consume hcaptcha and pwn deps (#22610) 2023-01-29 09:49:51 -06:00
highlight Add option to disable ambiguous unicode characters detection (#28454) 2023-12-17 14:38:54 +00:00
hostmatcher Support allowed hosts for webhook to work with proxy (#27655) 2023-10-18 09:44:36 +00:00
html Refactor backend SVG package and add tests (#26335) 2023-08-05 04:34:59 +00:00
httpcache [BRANDING] add X-Forgejo-* headers 2024-02-05 16:02:14 +01:00
httplib Less naked returns (#25713) 2023-07-07 05:31:56 +00:00
indexer Use db.ListOptions directly instead of Paginator interface to make it easier to use and fix performance of /pulls and /issues (#29990) 2024-03-30 07:17:29 +01:00
issue/template Extend issue template yaml engine (#29274) 2024-03-06 12:10:47 +08:00
json Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
label Make label templates have consistent behavior and priority (#23749) 2023-04-10 16:44:02 +08:00
lfs [GITEA] Drop sha256-simd in favor of stdlib 2024-02-05 16:09:40 +01:00
log Reduce some allocations in type conversion (#26772) 2023-08-29 00:43:16 +08:00
markup [BUG] Don't color dot literal color names 2024-03-30 22:12:40 +00:00
mcaptcha Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
metrics Reduce usage of db.DefaultContext (#27073) 2023-09-14 17:09:32 +00:00
migration Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
nosql Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
optional migrate some more "OptionalBool" to "Option[bool]" (#29479) 2024-03-06 12:10:44 +08:00
options Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
packages [GITEA] feat(nuget): basic manifest download 2024-02-05 15:08:04 +01:00
paginator Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
pprof Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
private [CLI] implement forgejo-cli 2024-02-05 13:33:58 +01:00
process Replace assert.Fail with assert.FailNow (#27578) 2023-10-11 11:02:24 +00:00
proxy Use proxy for pull mirror (#22771) 2023-02-11 08:39:50 +08:00
proxyprotocol Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
public Refactor CORS handler (#28587) 2023-12-25 20:13:18 +08:00
queue workergroup: gracefully exit on close(popItemErr) 2024-03-24 07:12:31 +01:00
recaptcha Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
references Fix issue link does not support quotes (#29484) (#29487) 2024-03-06 12:10:45 +08:00
regexplru Upgrade go dependencies (#25819) 2023-07-14 11:00:31 +08:00
repository Move generate from module to service (#29465) 2024-03-06 12:10:44 +08:00
secret [GITEA] Drop sha256-simd in favor of stdlib 2024-02-05 16:09:40 +01:00
session Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
setting Remember login for a month by default (#30150) 2024-03-30 07:17:31 +01:00
sitemap Fix sitemap (#22272) 2022-12-30 23:31:00 +08:00
ssh Remove SSH workaround (#27893) 2023-11-03 15:21:05 +00:00
storage Add minio bucket lookup type option 2024-03-06 09:38:02 +00:00
structs [REFACTOR] webhook.Handler interface 2024-03-24 10:35:06 +01:00
svg Refactor backend SVG package and add tests (#26335) 2023-08-05 04:34:59 +00:00
sync Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
system Replace more db.DefaultContext (#27628) 2023-10-15 17:46:06 +02:00
templates Render code tags in commit messages (#30146) 2024-03-30 07:17:32 +01:00
test [TESTS] add log.Level to test.NewLogChecker 2024-02-05 16:54:44 +01:00
testlogger [I18N] Add missing translation for more_items 2024-03-26 22:39:46 +05:00
timeutil Remove the time-since class (#29826) 2024-03-20 08:46:30 +01:00
translation log.Error on missing translation 2024-03-24 07:11:18 +01:00
turnstile Add new captcha: cloudflare turnstile (#22369) 2023-02-05 15:29:03 +08:00
typesniffer Detect ogg mime-type as audio or video (#26494) 2023-08-15 10:31:25 +08:00
updatechecker [PRIVACY] Add a DNS method to fetch new updates 2024-02-05 15:38:36 +01:00
uri Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
user Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
util Revert "cherry pick only IfZero from (#29755)" 2024-03-28 11:46:41 +00:00
validation [GITEA] add option for banning dots in usernames 2024-02-05 16:05:50 +01:00
web [REFACTOR] webhook matrix endpoints 2024-03-27 15:38:38 +01:00
webhook Fix schedule tasks bugs (#28691) 2024-03-25 16:25:02 +01:00