aboutsummaryrefslogtreecommitdiffstats
path: root/ui-log.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* ui-log: Implement support for commit graphsJohan Herland2010-11-161-21/+82
| | | | | | | | | | | | | | | | Teach CGit to print an ASCII art commit graph to the left of the commit message, similar to 'git log --graph'. The graph adds extra lines (table rows) to the log when needed to add/remove/shuffle edges in the graph. When 'showmsg' is enabled, the graph is automatically padded to account for the extra lines added by the commit message/notes. This feature is controlled by a new config variable: "enable-commit-graph" (disabled by default), and individual repos can control it by setting "repo.enable-commit-graph". Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-log: Change display of full commit messages (and notes)Johan Herland2010-11-161-13/+17
| | | | | | | | | | | | | | | | | | | | | | | When showmsg is enabled, ui-log (in addition to the table row containing the details of the current commit) adds a second table row containing the remainder of the commit message, and yet another table row containing the commit notes (if any). The vertical margins between commit subject, commit message and commit notes are controlled by CSS. In preparation for the commit graph (which will be printed to the left of the commit message/notes) we need to eliminate these vertical margins (as they would produce ugly gaps in the commit graph) and instead achieve them by adding newlines to the commit message/notes. Furthermore, we can no longer print the "Notes:" header in the "Age" column, since the graph will be drawn between the "Age" column and the "Commit message" column. This patch therefore prepares the commit message and commit notes in a single buffer (properly formatting the notes using the NOTES_SHOW_HEADER and NOTES_INDENT flags to format_note()), and then prints the entire buffer into a single table row. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-log.c: improve handling of range-search argumentLars Hjemli2010-11-101-11/+60
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-log: Prevent crash when given empty range searchJohan Herland2010-11-101-1/+1
| | | | | Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-log: Fix filecount/linecount when path limit is in effectJohan Herland2010-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | When using ui-log with path limits, the listing of commits enables parent rewriting in Git's internal log machinery. This did not work well together with cgit_diff_commit() which is used to generate the filecount and linecount numbers for each commit in the log view. cgit_diff_commit() would operate without any path limits, and would therefore process the full diff between the commits shown (which, because of parent rewriting, is not the same as processing the diff for the commit itself). Additionally, the bottom commit in the log view would (again, because of parent rewriting) have zero parents, causing us to process the entire diff between the empty tree and that commit. Since path limits were not in effect, this would (in large projects) reports thousands of files and millions of lines changed in that bottom commit. This patch fixes the issue by applying the same path limit to cgit_diff_commit() as is applied to the rest of the log view. The result is that the filecount/linecount now only reflects the diff as it pertains to the given path limit. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* fix errors in printf-style format stringsMark Lodato2010-09-041-2/+1
| | | | | | | | | | | | | | | | | There were many places where the arguments to a printf-like function did not match the format string. Mostly, these were a missing 'l' flag, but there were three exceptions: - In ui-stats.c, a size_t argument must be printed. C99 has the "%zu" flag for this purpose, but not all compilers support this. Therefore, we mimic what git does - use a NO_C99_FORMAT Makefile variable. - In ui-stats.c, cgit_print_error() was called with a pointer instead of a character. - In ui-log.c, the "columns" argument was never used. Signed-off-by: Mark Lodato <lodatom@gmail.com>
* Use GIT-1.7.2.2Lars Hjemli2010-08-221-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-log: Display git notes when presentJeff Smith2010-08-041-0/+12
| | | | | Signed-off-by: Jeff Smith <whydoubt@yahoo.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'jh/ignorews'Lars Hjemli2010-07-181-1/+2
|\
| * Add URL parameter 'ignorews' for optionally ignoring whitespace in diffsJohan Herland2010-07-181-1/+2
| | | | | | | | | | | | | | | | The new ctx.qry.ignorews variable is passed via cgit_diff_files() and cgit_diff_tree() to Git's diff machinery. This is equivalent to passing --ignore-all-space to 'git diff'. Signed-off-by: Johan Herland <johan@herland.net>
* | Merge branch 'lh/range-search'Lars Hjemli2010-06-221-4/+7
|\ \ | |/ |/|
| * ui-log.c: allow commit range as search expressionLars Hjemli2010-06-191-4/+7
| | | | | | | | | | Inspired-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Add URL parameter 'context' for changing the number of context lines in diffsJohan Herland2010-06-191-1/+1
| | | | | | | | | | | | | | | | The new ctx.qry.context variable is picked up by cgit_print_diff(), and passed via cgit_diff_files() to Git's diff machinery. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | ui-log: Preserve path limit in outgoing linksJohan Herland2010-06-191-12/+15
| | | | | | | | | | | | | | | | This allows navigation through the 'log' page/command without losing the active path limit. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | ui-commit: Preserve path limit in links to commit pageJohan Herland2010-06-191-2/+2
|/ | | | | | | | | | | 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>
* Add possibility to switch between unidiff and side-by-side-diff.Ragnar Ouchterlony2009-09-161-2/+2
| | | | | | | | | | | | | | | | 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>
* Use GIT-1.6.4.3Lars Hjemli2009-09-131-1/+1
| | | | Signed-off-by: Lars Hjemli <larsh@slackbox.hjemli.net>
* ui-log.c: handle lightweight tags when printing commit decorationsLars Hjemli2009-08-161-0/+4
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Handle binary files in diffsLars Hjemli2009-01-311-1/+6
| | | | | | | This teaches all diff-related operations (i.e. ui-log, ui-diff and ui-patch) how to handle binary files. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Change toggle to more meaningful termJustin Waters2009-01-111-1/+2
| | | | | | | | In the log interface, there is a toggle link at the top, but it isn't clear what's being toggled. I've changed it to "Expand" and "Collapse" to make it clear that you are getting more and less information, respectively. Signed-off-by: Justin Waters <justin.waters@timesys.com>
* ui-log: show name-decorations in log outputLars Hjemli2009-01-111-0/+35
| | | | | | | Commits are now decorated with a clickable 'label' for each ref pointing at it, similar to how gitweb and gitk displays commit decorations. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'full-log'Lars Hjemli2008-12-061-7/+28
|\ | | | | | | | | | | Conflicts: cgit.c cgit.h
| * ui-log: use css to make full-log prettierLars Hjemli2008-11-301-8/+6
| | | | | | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * ui-log: (ab)use extra columns for commit message when showmsg=1Lars Hjemli2008-11-291-6/+7
| | | | | | | | | | | | | | | | If the commit message has extra long lines it's better to use the author/ files/lines columns to show those lines than to push the columns of screen and force the users to hscroll. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * ui-log: add support for showing the full commit messageLars Hjemli2008-11-291-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-log: try to disambiguate ref namesLars Hjemli2008-12-031-2/+15
|/ | | | | | | | | | | | | | The 'h' querystring parameter in cgit is normally used to specify a branch (i.e. a ref below refs/heads/), but if a repository contains a tag with the same name as a branch the output from ui-log would use the tag as start-revision. This patch tries to fix the issue by checking if the specified ref is valid as a branch name; if so, the full refname is used in the call to setup_revisions(). Noticed-by: Takamori Yamaguchi <akschar@gmail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use GIT-1.6.0.2Lars Hjemli2008-10-051-4/+2
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Make a few more columns in repolist and log view clickableLars Hjemli2008-04-141-0/+5
| | | | | | Less mouse movement is nice. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Make branches, tags and log play better together in the summary viewLars Hjemli2008-04-141-16/+26
| | | | 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-0/+1
| | | | | | | | 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-5/+5
| | | | | | | | 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-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Show lines changed as -n/+m in shortlogsLars Hjemli2007-11-061-7/+14
| | | | | | | This is way more informative than the total number of changed lines. Suggested-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add search parameters to cgit_log_linkLars Hjemli2007-11-031-2/+4
| | | | | | This makes the [prev] and [next] links work correctly on search results. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Teach log search about --grep, --author and --committerLars Hjemli2007-10-281-3/+6
| | | | | | | This makes the log searching more explicit, using a dropdown box to specify the commit field to match against. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add ofs argument to cgit_log_link and use it in ui-log.cLars Hjemli2007-06-291-9/+7
| | | | | | | 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>
* ui-log: honor id=sha1 on querystringLars Hjemli2007-06-171-0/+3
| | | | | | | | | This teaches ui-log to prefer id=sha1 and fallback to h=rev if no id- parameter is specified. With this change, summary, log, commit and tree views now passes current branch using h parameter and current revision using id parameter. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add cgit_commit_link() + support for id=sha1 to commit viewLars Hjemli2007-06-171-5/+2
| | | | | | | | 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 option to disable pager to cgit_print_log().Ondrej Jirman2007-05-311-15/+17
| | | | | | | This is needed for upcomming shortlog on summary page patch. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use &amp; instead of & in URLs.Ondrej Jirman2007-05-311-2/+2
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use cgit_print_age() on summary and log pagesLars Hjemli2007-05-221-6/+2
| | | | | | Update the pages to show relative dates instead of yyyy-mm-dd hh:mm:ss Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add knobs to enable/disable files/lines changed in log viewLars Hjemli2007-05-181-12/+21
| | | | | | | | | | | These columns can cause lots of IO on the server, so add settings to explicitly enable them. Also, add per repo settings to optionally disable the columns if sitewide enabled. While at it, do not allow repo.snapshot to enable snapshots if the global setting is disabled. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Change commit-view to expect h parameter, not idLars Hjemli2007-05-161-2/+1
| | | | | | The change makes the commit-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-2/+6
| | | | | | | 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>
* Show number of changed lines in log viewLars Hjemli2007-05-131-1/+11
| | | | | | | Use the new file-diff interface to calculate number of changed lines per commit. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Show number of changed files in log viewLars Hjemli2007-05-131-2/+15
| | | | | | | | | This uses the new tree-diff functions to calculate number of files changed per commit. Also fix some whitespace issues. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Layout updateLars Hjemli2007-02-211-1/+0
|
* Add parameter to adjust max message length in log listingsLars Hjemli2007-01-281-1/+1
| | | | | | | | | The parameter "max-message-length" can be specified in cgitrc, default value is 60. This affects the log message shown in repo summary and shortlog. Signed-off-by: Lars Hjemli <hjemli@gmail.com>