Skip to content

app.ini option to allow clone filters #14697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bagasme opened this issue Feb 16, 2021 · 2 comments · Fixed by #24860
Closed

app.ini option to allow clone filters #14697

bagasme opened this issue Feb 16, 2021 · 2 comments · Fixed by #24860
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Comments

@bagasme
Copy link
Contributor

bagasme commented 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.

@zeripath
Copy link
Contributor

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

@bagasme
Copy link
Contributor Author

bagasme commented 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

@zeripath zeripath added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Mar 12, 2021
silverwind added a commit that referenced this issue May 23, 2023
…stogram` by default (#24860)

Close #13454 , Close #23255, Close #14697 (and maybe more related
issues)

Many users have the requirement to customize the git config. This PR
introduces an easy way: put the options in Gitea's app.ini
`[git.config]`, then the config options will be applied to git config.

And it can support more flexible default config values, eg: now
`diff.algorithm=histogram` by default. According to:
https://stackoverflow.com/a/32367597/4754037 , `histogram diff` is
efficient and doesn't like to cause server-side problems.

---------

Co-authored-by: silverwind <[email protected]>
Co-authored-by: KN4CK3R <[email protected]>
Co-authored-by: Giteabot <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
2 participants