[PATCH] Add an option to disable the branch switch form

Lukas Fleischer cgit at cryptocrack.de
Sun May 31 23:53:22 CEST 2015


On Sat, 07 Feb 2015 at 17:33:36, Lukas Fleischer wrote:
> Introduce a configuration option enable-switch-form that is enabled by
> default and can be used to disable the branch quick switch form in the
> top-right corner of repository pages.
> 
> Rationale: For repositories with a huge number of branches, the code
> generated for the switch form might become so large that it dominates
> the size of the HTTP response. For example, at the time of writing this
> commit message, the HTTP body of the Arch Linux community.git cgit index
> at https://projects.archlinux.org/svntogit/community.git/ has a size of
> 228KB. Removing the form shrinks the size to only 12KB.
> 
> Signed-off-by: Lukas Fleischer <cgit at cryptocrack.de>
> ---
> I am not totally happy with the name but I did not come up with anything
> more expressive that is short enough at the same time. Suggestions
> welcome!
> [...]

Starting from next week, I am going to maintain another cgit setup where
this patch is needed. Any chance this will make it into mainline?

I am also open to other suggestions. Maybe a (configurable) limit for
the number of entries in the branch switcher?

Right now, cgit is unusable with a huge number of branches.

Regards,
Lukas


More information about the CGit mailing list