app.ini option to allow clone filters #6874

Closed
opened 2025-11-02 07:09:40 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @bagasme on GitHub (Feb 16, 2021).

Description

Currently to allow clone filters (upload pack filters), one have to manually set the option via git config, as described on the docs.

To be better, there should be option on app.ini named ALLOW_CLONE_FILTERS (or ALLOW_UPLOAD_PACK_FILTERS) which toggle git config allowpack.togglefilter globally, defaulted to false (which disallow filters). To allow filters, set the option to true.

This option can be overridden on per-repo basis.

Note that clone filters requires Git version 2.22 or later. The option above must be hardcoded to false for instances running Git versions lower than the required.

Originally created by @bagasme on GitHub (Feb 16, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> ## Description Currently to allow clone filters (upload pack filters), one have to manually set the option via `git config`, as described on [the docs](https://docs.gitea.io/en-us/clone-filters/). To be better, there should be option on `app.ini` named `ALLOW_CLONE_FILTERS` (or `ALLOW_UPLOAD_PACK_FILTERS`) which toggle git config `allowpack.togglefilter` globally, defaulted to false (which disallow filters). To allow filters, set the option to true. This option can be overridden on per-repo basis. Note that clone filters requires Git version 2.22 or later. The option above must be hardcoded to false for instances running Git versions lower than the required.
GiteaMirror added the type/feature label 2025-11-02 07:09:40 -06:00
Author
Owner

@zeripath commented on GitHub (Feb 16, 2021):

What's wrong with just setting it in .gitconfig for gitea user.

@zeripath commented on GitHub (Feb 16, 2021): What's wrong with just setting it in .gitconfig for gitea user.
Author
Owner

@bagasme commented on GitHub (Feb 17, 2021):

@zeripath i think i propose this issue for convenience. It is more convenient to have app.ini option that abstracts actual git config than using git config directly

@bagasme commented on GitHub (Feb 17, 2021): @zeripath i think i propose this issue for convenience. It is more convenient to have `app.ini` option that abstracts actual `git config` than using `git config` directly
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6874