aboutsummaryrefslogtreecommitdiffstats
path: root/ui-tree.c
Commit message (Collapse)AuthorAgeFilesLines
* ui-tree: add link to plain view for blobs in tree listingLars Hjemli2010-02-281-0/+2
| | | | | Suggested-by: Robert Weidlich <mail@robertweidlich.de> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'stable'Lars Hjemli2009-12-121-1/+1
|\
| * Fix segfault on ppc when browsing treeMartins Polakovs2009-12-121-1/+1
| |
* | "max-blob-size" config var to limit generated HTML sizeGeorg Lukas2009-11-281-0/+6
|/ | | | | | | | | Sometimes it is not feasible to generate the HTML pretty-print for large files, especially if a source-filter is involved or binary data is to be displayed. The "max-blob-size" config var allows to disable HTML output for blobs bigger than X KBytes. Plain downloads are not affected. Signed-off-by: Georg Lukas <georg@op-co.de>
* Rename "linenumbers" to "enable-tree-linenumbers", change default to "1"Lars Hjemli2009-08-211-1/+1
| | | | | | | | | | | | | | This makes the name of the cgitrc option more descriptive and at the same time changes the default from "0" to "1" in an attempt to stay backwards compatible - prior to the introduction of "source-filter" and "linenumbers", cgit always generated linenumber links in the tree view, but now this feature can be turned off (one might want to do this if the source-filter performs line-wrapping etc). While at it, the documentation is updated to match the surrounding descriptions. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add 'linenumbers' config optionFlorian Pritz2009-08-211-11/+16
| | | | | Signed-off-by: Florian Pritz <bluewind@xssn.at> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-tree.c: show line numbers when highlightingFlorian Pritz2009-08-211-9/+11
| | | | | | | | | When source-filter is enabled, cgit currently will not display linenumbers in the tree view. This patch restores the linenumber function. Signed-off-by: Florian Pritz <bluewind@xssn.at> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'lh/plugins'Lars Hjemli2009-08-091-4/+14
|\ | | | | | | | | | | Conflicts: cgit.c cgit.h
| * Add support for repo.commit-filter and repo.source-filterLars Hjemli2009-08-091-4/+4
| | | | | | | | | | | | | | These options can be used to override the default commit- and source- filter settings per repository. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * ui-tree: add support for source-filter optionLars Hjemli2009-07-311-4/+14
| | | | | | | | | | | | | | | | | | | | This new option is used to specify an external command which will be executed when displaying blob content in the tree view. Blob content will be written to STDIN of the filter and STDOUT from the filter will be included verbatim in the html output from cgit. The file name of the blob will be passed as the only argument to the filter command. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Expose file extension in tree lists as class to allow nicer tree stylingMartin Szulecki2009-08-081-1/+7
|/ | | | Signed-off-by: Martin Szulecki <opensuse@sukimashita.com>
* fix segfault when displaying empty blobsEric Wong2009-03-151-5/+8
| | | | | | | | When size is zero, subtracting one from it turns it into ULONG_MAX which causes an out-of-bounds access on buf. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-tree: escape ascii-text properly in hexdump viewLars Hjemli2009-02-121-4/+9
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-tree: show hexdump of binary blobsLars Hjemli2009-01-311-23/+48
| | | | | | | This teaches ui-tree to detect binary blobs and display them similar to `hexdump -C` (only wider). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'og/tree-view-selection'Lars Hjemli2009-01-271-15/+16
|\ | | | | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * changed objects are outputted, allowing for selections of code onlyOnne Gorter2009-01-101-15/+16
| |
* | Merge branch 'lh/stats'Lars Hjemli2009-01-271-0/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | Conflicts: cgit.c cgit.css cgit.h ui-tree.c Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * ui-tree: add link to stats page per pathLars Hjemli2008-12-071-0/+3
| | | | | | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Merge branch 'stable'Lars Hjemli2009-01-061-2/+4
|\ \
| * | ui-tree.c: do not add blank line when displaying blobsLars Hjemli2009-01-061-2/+4
| |/ | | | | | | | | | | | | Also, fix a related bug in the test-suite. Noticed-by: Jim Meyering <jim@meyering.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* / ui-log: add support for showing the full commit messageLars Hjemli2008-11-291-1/+1
|/ | | | | | | | | | | | | | | Some users prefer to see the full message, so to make these users happy the new querystring parameter "showmsg" can be used to print the full commit message per log entry. A link is provided in the log heading to make this function accessible, and all links and forms tries to preserve the users preference. Note: the new link is not displayed on the summary page since the point of the summary page is to be a summary, but it is still obeyed if specified manually. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-tree: link to plain view instead of blob viewLars Hjemli2008-08-061-4/+4
| | | | | | | | | | | The urls for plain view makes it possible to download blobs without knowing their SHA1, but the function needs to be promoted and the link from tree view seems like a perfect fit. PS: Although hidden, the blob view still is nice for direct blob access so there's no point in removing it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Adjust to new calling convention for read_tree_recursive()Lars Hjemli2008-07-211-5/+7
| | | | | | | | In GIT-1.6.0, read_tree_recursive takes an extra void pointer for callback data. We might want to use this to avoid some global variables, but for now lets just make sure that we can still compile. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-tree.c: avoid peeking at GITLINK objectsLars Hjemli2008-05-201-6/+8
| | | | | | | | | When an object in the tree has GITLINK mode-bits we don't need to get any more info about that particular object (and trying to get more info about it will usually generate an annoying warning on stderr since the object typically doesn't exist in the repo anyways). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Don't specify mimetype in ui-blob.cLars Hjemli2008-04-081-1/+2
| | | | | | | | But be sure to specify correct filename. This way, the client can hopefully guess a sensible mimetype based on the filename suffix, and cgit can ignore the issue altogether. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add ui-shared.hLars Hjemli2008-03-241-0/+1
| | | | | | | 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>
* Introduce html.hLars Hjemli2008-03-181-1/+2
| | | | | | | | 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>
* Move cgit_repo into cgit_contextLars Hjemli2008-02-161-1/+1
| | | | | | | | This removes the global variable which is used to keep track of the currently selected repository, and adds a new variable in the cgit_context structure. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Introduce struct cgit_contextLars Hjemli2008-02-161-10/+10
| | | | | | | | | This struct will hold all the cgit runtime information currently found in a multitude of global variables. The first cleanup removes all querystring-related variables. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Fix html error detected by test-suiteLars Hjemli2007-11-111-3/+3
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add search parameters to cgit_log_linkLars Hjemli2007-11-031-1/+1
| | | | | | This makes the [prev] and [next] links work correctly on search results. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Remove a few compiler warningsLars Hjemli2007-09-201-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-tree: show last line of blobLars Hjemli2007-09-201-2/+5
| | | | | | | | | The last line in a blob was never printed by ui-tree::print_object(), which was particularly annoying when the blob missed a final newline. This fixes the issue. Noticed-by: <mkraai@beckman.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-tree: specify parameter position for all htmlf formatsLars Hjemli2007-09-191-1/+1
| | | | | | | | The GNU C library manual tells us that behavior is undefined if only some formats has a specification for the parameter position. Noticed-by: <mkraai@beckman.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'jo/dirlink'Lars Hjemli2007-09-031-2/+2
|\ | | | | | | | | | | | | | | | | | | | | * jo/dirlink: Rename dirlink to gitlink. Conflicts: ui-tree.c Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * Rename dirlink to gitlink.Jeffrey C. Ollie2007-06-041-2/+2
| | | | | | | | | | | | | | Git changed from dirlink to gitlink in 302b9282c9ddfcc704ca759bdc98c1d5f75eba2f. Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
* | Add support for line number in url fragmentLars Hjemli2007-07-231-1/+1
| | | | | | | | | | | | | | With this change, urls like http://hjemli.net/git/cgit/tree/ui-tree.c#43 can be used to jump directly to the specified line number. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | link raw blob from tree file viewMichael Krelin2007-07-211-0/+4
| | | | | | | | Signed-off-by: Michael Krelin <hacker@klever.net>
* | Add ofs argument to cgit_log_link and use it in ui-log.cLars Hjemli2007-06-291-1/+1
| | | | | | | | | | | | | | This fixes a bug in the prev/next links on the log page: when on the default branch the links to prev/next page would contain h=(null). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Change S/L/T to summary/log/treeLars Hjemli2007-06-181-1/+1
| | | | | | | | | | | | | | | | In yet another attempt at better usability, the cryptic S/L/T links are changed to show their full name. Suggested-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Add cgit_commit_link() + support for id=sha1 to commit viewLars Hjemli2007-06-171-1/+0
| | | | | | | | | | | | | | | | This adds a function to generate links to the commit page and extends said page to use id from querystring as primary revision specified (fallback to h). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Add git_log_link() and fix bug in generic repolink functionLars Hjemli2007-06-171-8/+4
| | | | | | | | | | | | | | | | | | | | | | The generic repolink function compared head with cgit_query_head, which almost always would be the same pointer. The test now compares with repo.defbranch, which is the wanted behavour. Bug discovered while adding cgit_log_link(), so this commit also contain that change. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | ui-tree: html/css cleanupLars Hjemli2007-06-171-10/+8
| | | | | | | | | | | | | | | | Various fixes to make html and css more "clean". The only visible change is the link to file/directory log: it is now printed as "L" (for Log) instead of "H" (for History). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Add and use cgit_tree_link()Lars Hjemli2007-06-171-15/+18
| | | | | | | | | | | | | | This creates a new function used to generate links to 'tree' page and uses the function everywhere a link to the 'tree' page is generated. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | ui-tree: make blob viewer generate valid htmlLars Hjemli2007-06-161-1/+0
| | | | | | | | | | | | | | A leftover '</td></tr>' made ui-tree generate invalid html for blob content. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | ui-tree: unify with ui-view, use path to select tree/blobLars Hjemli2007-06-161-42/+152
|/ | | | | | This teaches ui-tree to show both trees and blobs, thereby making ui-view superfluous. At the same time, ui-tree is extended to honour the specified path instead of requiering a tree/blob sha1.
* Use &amp; instead of & in URLs.Ondrej Jirman2007-05-311-3/+3
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Fixed unexpected tags in html output.Ondrej Jirman2007-05-311-1/+1
| | | | | | At least those that were catched by tidy. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add support for tree listing via h parameterLars Hjemli2007-05-161-0/+10
| | | | | | This makes the tree page benefit from repo.defbranch. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add log filtering by path and link to it from tree viewLars Hjemli2007-05-141-6/+19
| | | | | | | This enables path-filtering in log-view, and adds a link per entry in tree-view to show the log for each file/directory. Signed-off-by: Lars Hjemli <hjemli@gmail.com>