about summary refs log tree commit diff
path: root/ui-snapshot.c (follow)
Commit message (Collapse)AuthorAge
* cgit.c: always setup cgit repo environment variablesLars Hjemli2011-06-13
| | | | | | | | | | | | When cgit learned to setup environment variables for certain repo settings before invoking a filter process, the setup occurred inside cgit_open_filter(). This patch moves the setup out of cgit_open_filter() and into prepare_repo_cmd() to prepare for additional uses of these variables. Reviewed-by: Ferry Huberts <mailings@hupie.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'stable'Lars Hjemli2011-06-02
|\
| * ui-snapshot.c: remove debug cruftLars Hjemli2011-06-02
| | | | | | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | cgit_open_filter: also take the repo as a parameterFerry Huberts2011-03-26
|/ | | | | | | | To prepare for handing repo configuration to the filter script that is executed. Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'stable'Lars Hjemli2010-09-01
|\
| * ui-snapshot: actually compress zip archivesLars Hjemli2010-09-01
| | | | | | | | | | | | | | Since cgit linked with git-1.6.0 all zip archives has been uncompressed. This patch fixes the issue by specifying Z_DEFAULT_COMPRESSION. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Add .tar.xz-snapshot supportAndreas Wiese2009-12-08
|/ | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-snapshot: use cgit_{open|close}_filter() to execute compressorsLars Hjemli2009-07-31
| | | | | | | This simplifies the code in ui-snapshot.c and makes the test-suite verify the new filter-functions. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-snapshot: avoid segfault when no filename is specifiedLars Hjemli2009-03-15
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'snapshot-fixes'Lars Hjemli2009-01-11
|\
| * return 404 if snapshot is not foundNatanael Copa2008-12-28
| | | | | | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | ui-snapshot.c: change mime-type for tar.gz and tar.bz2Lars Hjemli2008-12-26
|/ | | | | | | The updated mime-types seems to work better than the old ones with both safari and firefox. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-snapshot: improve extraction of revision from snapshot nameLars Hjemli2008-12-01
| | | | | | | | | | | | | | | The modified get_ref_from_filename() supports the following snapshot formats: * $REV.$EXT * $REPO[-_]*v?$REV.$EXT This implies that the following urls will retrieve the expected revision: * http://hjemli.net/git/cgit/snapshot/v0.8.1.tar.gz * http://hjemli.net/git/cgit/snapshot/0.8.1.tar.gz * http://hjemli.net/git/cgit/snapshot/cgit-0.8.1.tar.gz * http://hjemli.net/git/cgit/snapshot/cgit-140012d7a8.tar.gz Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Set prefix in snapshots when using dwimmeryNatanael Copa2008-11-30
| | | | | | | | | | This patch sets the directory prefix in archives to be the filename, excluding the suffix (.tar.gz, .tar.bz2 etc). The patch also removes the prefix parameter in cgit_print_snapshot() as the prefix might differ. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-snapshot: add dwimmeryLars Hjemli2008-10-11
| | | | | | | | | | | | | | | When downloading a snapshot, the snapshot name will often contain the repo name combined with a tag. This patch tries to exploit this so that the correct revision is downloaded even if no specific revision is specified. PS: this only occurs if neither 'h' nor 'id' is specified in the query- string. PPS: this also fixes a bug which occurs when trying to download a filename with an unsupported suffix: it used to try to print an error message to the user but failed since it didn't prepare the output properly. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-snapshot.c: specify archiver_args.baselenLars Hjemli2008-10-05
| | | | | | | | | | The struct member was introduces in git commit d53fe8187c38, but the cgit testsuite failed to detect that cgit always generated archives without prefixes, i.e. the result from cgit_repobasename was ignored. This fixes the bug and the testsuite. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add ui-shared.hLars Hjemli2008-03-24
| | | | | | | This is finally a proper headerfile for the shared ui-functions which used to reside in cgit.h Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Refactor snapshot supportLars Hjemli2008-03-24
| | | | | | | | | The snapshot support needs to be split between output- and config-related functions to get the layering between shared.c and ui-*.c right. There is also some codestyle-issues which needs fixing to make the snapshot functions more similar to the rest of the cgit code. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Remove obsolete cacheitem parameter to ui-functionsLars Hjemli2008-03-24
| | | | | | This parameter hasn't been used for a very long time... Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add struct cgit_page to cgit_contextLars Hjemli2008-03-24
| | | | | | | | This struct is used when generating http headers, and as such is another small step towards the goal of the whole cleanup series; to invoke each page/view function with a function pointer. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Introduce html.hLars Hjemli2008-03-18
| | | | | | | | All html-functions can be quite easily separated from the rest of cgit, so lets do it; the only issue was html_filemode which uses some git-defined macros so the function is moved into ui-shared.c::cgit_print_filemode(). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Compare string lengths when parsing the snapshot maskLars Hjemli2007-12-03
| | | | | | | | | | We used to rely on the result from strncmp() without comparing the length of the strings involved. Even worse, any single-character format specifier would enable zip-format due to the optional '.'-prefix since the length of the mask then would become zero. Noticed-by: Evan Martin <sys@neugierig.org> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Set commit date on snapshot contentsLars Hjemli2007-11-11
| | | | | | | | The testsuite revealed that cgit snapshots don't set any useful timestamp on the files contained in the snapshot. Cherry-picked-from: 2ff33a8a0405b420cd75e0e207c7efeecd6f130b Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-snapshot: whitespace/formatting cleanupLars Hjemli2007-07-23
| | | | | | | | Introduce a #define for number of snapshot archive entries, move all decls to function entrypoint, remove some trailing whitespace and reformat a few lines. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* cgit_print_snapshot_links: use url to specify snapshot nameLars Hjemli2007-07-23
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* allow selective enabling of snapshotsMichael Krelin2007-07-21
| | | | | | | | snapshot configuration parameter now can be a space/slash/comma/colon/semicolon/pipe-separated list of snaphot suffixes as listed in ui-snapshot.c Signed-off-by: Michael Krelin <hacker@klever.net>
* shorten snapshot names to repo basenameMichael Krelin2007-07-21
| | | | Signed-off-by: Michael Krelin <hacker@klever.net>
* added snapshot filename to the linkMichael Krelin2007-07-21
| | | | | | | - changed cgit_pageurl into cgit_fileurl with the filename parameter - rewritten cgit_pageurl as a wrapper around cgit_fileurl Signed-off-by: Michael Krelin <hacker@klever.net>
* add plain uncompressed tar snapshort formatMichael Krelin2007-07-21
| | | | | | time to make available snapshots selectable Signed-off-by: Michael Krelin <hacker@klever.net>
* introduced .tar.bz2 snapshotsMichael Krelin2007-07-21
| | | | | | | | | | | - reworked write_tar_gzip_archive to handle arbitrary filter as a write_compressed_tar_archive - reformatted whitespaces in the said function to adhere to common cgit standards - added wrappers around write_compressed_tar_archive for .tar.gz and .tar.bz2 - added a hint for vim to use 8 characters shift width by default Signed-off-by: Michael Krelin <hacker@klever.net>
* compress .tar.gz using gzip as a filterMichael Krelin2007-07-20
|
* add support for snapshot tarballsMichael Krelin2007-07-18
| | | | | | | - reworked cgit_print_snapshot to use a list of supported archivers and pick one for the suffix supplied - moved printing of snaphot links into ui-snapshot and make it iterate through the said list
* Add support for snapshotsLars Hjemli2007-02-08
Make a link from the commit viewer to a snapshot of the corresponding tree. Currently only zip-format is supported. Signed-off-by: Lars Hjemli <hjemli@gmail.com>