Snapshot: Customize filename and remove obligatory folder

Lukas Fleischer lfleischer at lfos.de
Fri Nov 13 20:20:57 CET 2015


On Mon, 09 Nov 2015 at 13:11:51, Alexander Nitsche - e-pixler NEW MEDIA GmbH wrote:
> It would be nice to be able to
> 
> a) customize the automatically generated snapshot filename. In general
> it is {repository_name}-{branch}.zip. I - for integrity reasons - need
> to be able to say that the filename should be {filename_xy}.zip without
> the branch and a different name than the repo name. In my particular
> case this is for constraints of the CMS system Typo3.
> [...]

You should be able to achieve this by telling your web server to
redirect the URI to the path that cgit uses.

> b) remove the obligatory parent folder from the snapshot: e.g. if the
> tree structure of the git project "my_typo3_extension" is
> ---
> /classes/
> /resources/
> /configuration/
> ext_emconf.php
> ext_tables.php
> ..
> ---
> then the snapshot zip file looks like
> ---
> /my_typo3_extension
>   /classes/
>   /resources/
>   /configuration/
>   ext_emconf.php
>   ext_tables.php
>   ..
> ---
> but i need the snapshot to be without the parent folder
> "my_typo3_extension" - for Typo3 constraints again.
> [...]

I don't think this is currently possible but patching cgit to support
that should be fairly easy. Have a look at the prefix variable/parameter
in ui-snapshot.c.

Regards,
Lukas


More information about the CGit mailing list