summaryrefslogtreecommitdiff
path: root/ui-tree.c
AgeCommit message (Collapse)Author
2009-01-10changed objects are outputted, allowing for selections of code onlyOnne Gorter
2009-01-06Merge branch 'stable'Lars Hjemli
2009-01-06ui-tree.c: do not add blank line when displaying blobsLars Hjemli
Also, fix a related bug in the test-suite. Noticed-by: Jim Meyering <jim@meyering.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-12-07ui-tree: add link to stats page per pathLars Hjemli
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-11-29ui-log: add support for showing the full commit messageLars Hjemli
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>
2008-08-06ui-tree: link to plain view instead of blob viewLars Hjemli
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>
2008-07-21Adjust to new calling convention for read_tree_recursive()Lars Hjemli
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>
2008-05-20ui-tree.c: avoid peeking at GITLINK objectsLars Hjemli
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>
2008-04-08Don't specify mimetype in ui-blob.cLars Hjemli
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>
2008-03-24Add ui-shared.hLars Hjemli
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>
2008-03-18Introduce html.hLars Hjemli
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>
2008-02-16Move cgit_repo into cgit_contextLars Hjemli
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>
2008-02-16Introduce struct cgit_contextLars Hjemli
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>
2007-11-11Fix html error detected by test-suiteLars Hjemli
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-11-03Add search parameters to cgit_log_linkLars Hjemli
This makes the [prev] and [next] links work correctly on search results. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-09-20Remove a few compiler warningsLars Hjemli
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-09-20ui-tree: show last line of blobLars Hjemli
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>
2007-09-19ui-tree: specify parameter position for all htmlf formatsLars Hjemli
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>
2007-09-03Merge branch 'jo/dirlink'Lars Hjemli
* jo/dirlink: Rename dirlink to gitlink. Conflicts: ui-tree.c Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-07-23Add support for line number in url fragmentLars Hjemli
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>
2007-07-21link raw blob from tree file viewMichael Krelin
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-06-29Add ofs argument to cgit_log_link and use it in ui-log.cLars Hjemli
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>
2007-06-18Change S/L/T to summary/log/treeLars Hjemli
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>
2007-06-17Add cgit_commit_link() + support for id=sha1 to commit viewLars Hjemli
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>
2007-06-17Add git_log_link() and fix bug in generic repolink functionLars Hjemli
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>
2007-06-17ui-tree: html/css cleanupLars Hjemli
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>
2007-06-17Add and use cgit_tree_link()Lars Hjemli
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>
2007-06-16ui-tree: make blob viewer generate valid htmlLars Hjemli
A leftover '</td></tr>' made ui-tree generate invalid html for blob content. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-06-16ui-tree: unify with ui-view, use path to select tree/blobLars Hjemli
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.
2007-06-04Rename dirlink to gitlink.Jeffrey C. Ollie
Git changed from dirlink to gitlink in 302b9282c9ddfcc704ca759bdc98c1d5f75eba2f. Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2007-05-31Use &amp; instead of & in URLs.Ondrej Jirman
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-31Fixed unexpected tags in html output.Ondrej Jirman
At least those that were catched by tidy. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16Add support for tree listing via h parameterLars Hjemli
This makes the tree page benefit from repo.defbranch. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-14Add log filtering by path and link to it from tree viewLars Hjemli
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>
2007-05-11Add submodule links in tree listingLars Hjemli
When a submodule occurs in a tree, generate a link to show the module/commit. The link is specified as a sprintf string in /etc/cgitrc, using parameters 'module-link' and 'repo.module-link'. This should probably be extended with repo.module-link.$path. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-08Update to libgit 1.5.2-rc2Lars Hjemli
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-21Layout updateLars Hjemli
2007-01-28Cleanup table listingsLars Hjemli
Make the output for <table class='list'> a bit nicer Signed-off-by: Lars Hjemli <larsh@slaptop.hjemli.net>
2007-01-12WIP: add paths/backlinks to tree/blobviewLars Hjemli
2006-12-17Use html_filemode in ui-tree.cLars Hjemli
No reason to show "100644" when we can show "-rw-r--r--" Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2006-12-16Add ui-commit.c + misc ui cleanupsLars Hjemli
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2006-12-13Add display of tree content w/ui-tree.cLars Hjemli
Signed-off-by: Lars Hjemli <hjemli@gmail.com>