aboutsummaryrefslogtreecommitdiffstats
path: root/ui-commit.c
AgeCommit message (Collapse)AuthorFilesLines
2011-03-26cgit_open_filter: also take the repo as a parameterFerry Huberts1-3/+3
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>
2010-08-22Use GIT-1.7.2.2Lars Hjemli1-1/+1
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-08-04ui-commit: Display git notes when presentJeff Smith1-0/+15
Signed-off-by: Jeff Smith <whydoubt@yahoo.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-06-22Merge branch 'jh/path-limit'Lars Hjemli1-8/+12
Conflicts: cgit.h ui-commit.c
2010-06-19ui-commit: Preserve path limit in links to commit pageJohan Herland1-4/+5
This includes adding a path argument to cgit_commit_link() and updating all its callers. The callers from within the commit page (i.e. the "commit", "unidiff"/"side-by-side diff" and "parent" links) all preserve the path limit of the current commit page. All other callers pass NULL (i.e. no path limit). Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-06-19ui-commit: Preserve path limit in links to tree and diff pagesJohan Herland1-1/+5
For tree links, the original link is unchanged, but in the case of a path limit, a subtree link is added to the right of the original tree link. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-06-19ui-patch: Apply path limit to generated patchJohan Herland1-1/+1
Also indicate in the comment section of the patch that a path limit was applied, too easily see when a generated patch is only partial. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-06-19ui-commit: Limit diff based on path limit in qry.pathJohan Herland1-2/+2
Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-02-27Optionally generate verbose parent linksLars Hjemli1-5/+7
The new option 'enable-subject-links' must be used to enable the verbose parent-links in commit view. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-02-27display subject instead of sha1 as link title of parentsStefan Naewe1-3/+5
Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-09-16Add possibility to switch between unidiff and side-by-side-diff.Ragnar Ouchterlony1-3/+8
A new config option side-by-side-diffs added, defaulting to 0, meaning unidiff. Also a query option (ss) is used toggle this. In the commit page you can switch between the two diff formats by clicking on the link on the "commit"-row, to the right of (patch). In the diff page you can switch by using the link at the start of the page. All commit-links and diff-links will remember the choice. Signed-off-by: Ragnar Ouchterlony <ragnar@lysator.liu.se> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-09-13Use GIT-1.6.4.3Lars Hjemli1-1/+1
Signed-off-by: Lars Hjemli <larsh@slackbox.hjemli.net>
2009-08-09Merge branch 'lh/plugins'Lars Hjemli1-0/+8
Conflicts: cgit.c cgit.h
2009-08-09Add support for repo.commit-filter and repo.source-filterLars Hjemli1-8/+8
These options can be used to override the default commit- and source- filter settings per repository. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-08-08Introduce noplainemail option to hide email adresses from spambotsMartin Szulecki1-4/+8
Signed-off-by: Martin Szulecki <opensuse@sukimashita.com>
2009-07-31ui-commit: add support for 'commit-filter' optionLars Hjemli1-0/+8
This new option specifies a filter which is executed on the commit message, i.e. the commit message is written to the filters STDIN and the filters STDOUT is included verbatim as the commit message. This can be used to implement commit linking by creating a simple shell script in e.g. /usr/bin/cgit-commit-filter.sh like this: #/bin/sh sed -re 's|\b([0-9a-fA-F]{6,40})\b|<a href="./?id=\1">\1</a>|g' Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-01-27Add decorations to commit pagesJustin Waters1-0/+4
This adds the tag and branch head decorations to the commit pages. This is similar to how commits are displayed in the standard gitweb interface. Signed-off-by: Justin Waters <justin.waters@timesys.com>
2008-08-01Added `local-time` option to cgitrcStefan Naewe1-2/+2
When `local-time` is set, commit, tag and patch timestamps will be printed in the servers timezone. Also, regardless of the value of `local-time`, these timestamps will now always show the timezone. Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-05-18ui-commit: handle root commitsLars Hjemli1-3/+7
Both cgit_print_diff() and cgit_diff_tree() handles root commits nicely, but cgit_print_commit() forgot to check the case of 0 parents. This fixes it, and adds tests to avoid future regressions. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-24Integrate diffstat with diffLars Hjemli1-142/+4
This creates a generic diffstat function in ui-diff, which then is invoked from cgit_print_diff with the result that both commit and diff- view gets a diffstat. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-17Fix commitdiff annoyanceLars Hjemli1-1/+1
Someone were a bit sloppy when the commitdiff got included 'inline' in commit 89aa3c0d0a4c6d9885272602005975b763ea1604. This patch deletes a stray `)` and makes sure the diffstat summary `<div>` is closed before the full diff is printed. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-13Remove 'patch' link from tab, add to commit viewLars Hjemli1-0/+6
It's a bit confusing to enter the patch view from the tab, since it has no layout. And the commit view has always lacked showing the commit id. Both of these warts are fixed by this commit, which adds a new header line in the commit view which shows the commit id as a 'permalink' to the current commit and also adds a link to the patch view of the current commit. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-12Include diff in commit viewLars Hjemli1-3/+5
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-03-24Add ui-shared.hLars Hjemli1-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>
2008-03-18Introduce html.hLars Hjemli1-3/+4
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 Hjemli1-2/+2
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 Hjemli1-7/+7
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 Hjemli1-3/+3
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-10-01ui-commit.c: link to diff instead of tree from diffstatLars Hjemli1-2/+2
This makes each entry in the diffstat link to a path-restricted diff. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-07-23cgit_print_snapshot_links: use url to specify snapshot nameLars Hjemli1-1/+2
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-07-21allow selective enabling of snapshotsMichael Krelin1-1/+1
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>
2007-07-18add support for snapshot tarballsMichael Krelin1-6/+3
- 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
2007-06-17Add cgit_diff_link()Lars Hjemli1-30/+16
This adds a new function used to generate links to the diff page and uses it everywhere such links appear (expect for single files in the diffstat displayed on the commit page: this is now a link to the tree page). The updated diff-page now expects zero, one or two revision specifiers, in parameters head, id and id2. Id defaults to head unless otherwise specified, while head (as usual) defaults to repo.defbranch. If id2 isn't specified, it defaults to the first parent of id1. The most important change is of course that now all repo pages (summary, log, tree, commit and diff) has support for passing on the current branch and revision, i.e. the road is now open for a 'static' menu with links to all of these pages. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-06-17ui-commit: use cgit_commit_link() for parent linksLars Hjemli1-6/+4
This replaces the old cgit_pageurl() function with the brand new cgit_commit_link() function, making parent links in commit view preserve the current branch. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-06-17Add cgit_commit_link() + support for id=sha1 to commit viewLars Hjemli1-0/+3
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 and use cgit_tree_link()Lars Hjemli1-4/+6
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: unify with ui-view, use path to select tree/blobLars Hjemli1-2/+1
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-05-31Use &amp; instead of & in URLs.Ondrej Jirman1-4/+4
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-31Fixed unexpected tags in html output.Ondrej Jirman1-1/+1
At least those that were catched by tidy. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-22Add cgit_print_age() functionLars Hjemli1-2/+2
This function can be used to print relative dates, just as in gitweb. Next step will be to actually use the new function. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16Add link to commitdiff below diffstatLars Hjemli1-1/+5
This link is a lot easier to locate than the links to the right of the parent entries. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16Change commit-view to expect h parameter, not idLars Hjemli1-1/+1
The change makes the commit-page benefit from repo.defbranch. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15Use tables and css to create the diffstat graph, fix scalingLars Hjemli1-12/+8
There was no need to use image-files for the graphs, so lets drop them. At the same time, fix scaling of the graphs so that the full width is used only if atleast 100 LOC are changed in one of the files. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15Specify static storage class for file-local declarationsLars Hjemli1-4/+4
Also fix some whitespace issues while at it. Noticed by Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-14Add log filtering by path and link to it from tree viewLars Hjemli1-1/+2
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-13Add commitdiff between commit and each of it's parentLars Hjemli1-4/+15
A link is added next to each parent of a commit, leading to the new diff-functionality in ui-diff.c. Also added support for a path-parameter to filelevel diffs accessed via the diffstat. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13Add graphical diffstat to commit viewLars Hjemli1-31/+101
The diffstat is calculated against the leftmost parent of the commit. This gives nice information for "normal" merges while octopus merges are less than optimal, so the diffstat isn't calculated for those merges. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13Use standard tree-diff function when showing diffstat for single commitLars Hjemli1-51/+15
Remove unneeded code from ui-commit.c and replace with call to standard diff-functions. Also fix some whitespace issues. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-08Make snapshot feature configurableLars Hjemli1-5/+7
Snapshots can now be enabled/disabled by default for all repositories in cgitrc with param "snapshots". Additionally, any repo can override the default setting with param "repo.snapshots". By default, no snapshotting is enabled. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-08Add support for snapshotsLars Hjemli1-0/+7
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>