forgejo/modules
Giteabot 7db542a029
Fix archive creating LFS hooks and breaking pull requests (#28848) (#28851)
Backport #28848 by @brechtvl

When LFS hooks are present in gitea-repositories, operations like git
push for creating a pull request fail. These repositories are not meant
to include LFS files or git push them, that is handled separately. And
so they should not have LFS hooks.

Installing git-lfs on some systems (like Debian Linux) will
automatically set up /etc/gitconfig to create LFS hooks in repositories.
For most git commands in Gitea this is not a problem, either because
they run on a temporary clone or the git command does not create LFS
hooks.

But one case where this happens is git archive for creating repository
archives. To fix that, add a GIT_CONFIG_NOSYSTEM=1 to disable using the
system configuration for that command.

According to a comment, GIT_CONFIG_NOSYSTEM is not used for all git
commands because the system configuration can be intentionally set up
for Gitea to use.

Resolves #19810, #21148

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
(cherry picked from commit 0d50f27469)
2024-01-31 14:18:25 +01:00
..
actions [ACTIONS] on.schedule: the event is always "schedule" 2023-12-23 15:58:37 +01:00
activitypub More refactoring of db.DefaultContext (#27083) 2023-09-15 06:13:19 +00:00
analyze
assetfs
auth [GITEA] Drop sha256-simd in favor of stdlib 2023-11-13 14:06:31 +01:00
avatar [GITEA] Drop sha256-simd in favor of stdlib 2023-11-13 14:06:31 +01:00
base [GITEA] Drop sha256-simd in favor of stdlib 2023-11-13 14:06:31 +01:00
cache
charset Add option to disable ambiguous unicode characters detection (#28454) (#28499) 2023-12-22 12:07:01 +01:00
container
context [GITEA] rework long-term authentication 2024-01-16 14:14:46 +00:00
contexttest Avoid double-unescaping of form value (#26853) 2023-09-01 12:01:36 +00:00
csv
doctor Initalize stroage for orphaned repository doctor (#28487) (#28490) 2023-12-22 12:05:11 +01:00
emoji
eventsource More db.DefaultContext refactor (#27265) (#27347) 2023-09-29 13:35:01 +00:00
generate
git Fix archive creating LFS hooks and breaking pull requests (#28848) (#28851) 2024-01-31 14:18:25 +01:00
gitgraph More db.DefaultContext refactor (#27265) (#27347) 2023-09-29 13:35:01 +00:00
graceful
hcaptcha
highlight Add option to disable ambiguous unicode characters detection (#28454) (#28499) 2023-12-22 12:07:01 +01:00
hostmatcher Support allowed hosts for webhook to work with proxy (#27655) (#27675) 2023-10-18 15:07:52 +02:00
html
httpcache [BRANDING] add X-Forgejo-* headers 2023-11-13 13:58:18 +01:00
httplib
indexer Add option to disable ambiguous unicode characters detection (#28454) (#28499) 2023-12-22 12:07:01 +01:00
issue/template
json
label
lfs [GITEA] Drop sha256-simd in favor of stdlib 2023-11-13 14:06:31 +01:00
log
markup [GITEA] Fix relative links rendering 2024-01-17 17:57:22 +01:00
mcaptcha
metrics Reduce usage of db.DefaultContext (#27073) 2023-09-14 17:09:32 +00:00
migration
nosql
options
packages Close all hashed buffers (#27787) (#27790) 2023-10-25 22:24:25 +02:00
paginator
pprof
private Use correct has error check for internal responses (#28796) (#28798) 2024-01-16 14:40:56 +00:00
process
proxy
proxyprotocol
public Refactor CORS handler (#28587) (#28611) 2024-01-16 14:08:38 +00:00
queue [CI] disable redis test, no redis server yet in CI 2023-11-13 11:52:15 +01:00
recaptcha
references Replace 'userxx' with 'orgxx' in all test files when the user type is org (#27052) 2023-09-14 02:59:53 +00:00
regexplru
repository Ignore "non-existing" errors when getDirectorySize calculates the size (#28276) (#28285) 2023-12-08 13:41:16 +01:00
secret [GITEA] Drop sha256-simd in favor of stdlib 2023-11-13 14:06:31 +01:00
session Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
setting Fix panic when parsing empty pgsql host (#28708) (#28709) 2024-01-16 14:16:56 +00:00
sitemap
ssh [GITEA] Remove SSH workaround 2023-11-13 14:06:31 +01:00
storage [CI] Forgejo Actions based CI for PR & branches 2023-11-13 11:52:15 +01:00
structs [ACTIONS] on.schedule: create a new payload 2023-12-23 15:58:37 +01:00
svg
sync
system
templates Rework markup link rendering (#26745) (#28803) 2024-01-16 14:41:11 +00:00
test Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00
testlogger
timeutil Make template DateTime show proper tooltip (#28677) (#28683) 2024-01-16 14:16:55 +00:00
translation
turnstile
typesniffer
updatechecker [PRIVACY] Add a DNS method to fetch new updates 2023-11-13 13:57:31 +01:00
upload
uri
user
util [GITEA] rework long-term authentication 2024-01-16 14:14:46 +00:00
validation [GITEA] add option for banning dots in usernames 2023-11-13 14:04:16 +01:00
web [GITEA] Use maintained gziphandler 2024-01-16 14:09:55 +00:00
webhook [ACTIONS] on.schedule: the event is always "schedule" 2023-12-23 15:58:37 +01:00