aboutsummaryrefslogtreecommitdiffstats
path: root/cmd.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-23Merge branch 'lh/panel'Lars Hjemli1-1/+1
2011-05-14Merge branch 'dm/disable-clone'Lars Hjemli1-21/+21
2011-03-06ui-diff.c: create a control panel for diff optionsLars Hjemli1-1/+1
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2011-02-19Add is_clone flag to available commandsDan McGee1-21/+21
This will be used to make these operations configurable via a config option. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-11-16ui-log: Line-wrap long commit subjects when showmsg is enabledJohan Herland1-1/+2
When showmsg is disabled ui-log truncates long commit subjects. This is good. However, the same is not desirable when showmsg is enabled, since you then end up with a truncated commit subject followed by the rest of the commit message below. Instead, when showmsg is enabled (and we're using all this space to display the entire commit message, anyway), line-wrap the commit subject instead of truncating it. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-06-22Merge branch 'jh/path-limit'Lars Hjemli1-23/+23
Conflicts: cgit.h ui-commit.c
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-1/+1
Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-06-19struct cgit_cmd: Differentiate between various usages of ctx.qry.pathJohan Herland1-21/+21
For many commands/pages (e.g. 'tree', 'diff', 'plain', etc.), the ctx.qry.path argument is interpreted as a path within the "virtual" project directory structure. However, for some other commands (notably 'refs', and the clone-related commands) ctx.qry.path is used in a different context (as a more or less "real" path within the '.git' directory). This patch differentiates between these two usages of ctx.qry.path, by introducing a new variable - ctx.qry.vpath - which is equal to ctx.qry.path in the former case, and NULL in the latter. This will become useful in future patches when we want various pages and the links between them to preserve existing in-project paths. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-03-22Add 'max-atom-items' config variableAaron Griffin1-1/+1
This allows one to specify the items in the RSS feeds Signed-off-by: Aaron Griffin <agriffin@datalogics.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-08-09ui-summary: enable arbitrary paths below repo.readmeLars Hjemli1-1/+1
This change makes it possible to include any number of pages below the 'about' tab for a repository. The path is assumed to be located in the same directory as the 'repo.readme' file. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-01-27Merge branch 'lh/stats'Lars Hjemli1-0/+7
Conflicts: cgit.c cgit.css cgit.h ui-tree.c Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-12-07ui-stats: replace 'enable-stats' setting with 'max-stats'Lars Hjemli1-4/+1
The new 'max-stats' and 'repo.max-stats' settings makes it possible to define the maximum statistics period, both globally and per repo. Hence, it is now feasible to allow statistics on repositories with a high commit frequency, like linux-2.6, by setting repo.max-stats to e.g. 'month'. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-12-06Add a 'stats' page to each repoLars Hjemli1-0/+10
This new page, which is disabled by default, can be used to print some statistics about the number of commits per period in the repository, where period can be either weeks, months, quarters or years. The function can be activated globally by setting 'enable-stats=1' in cgitrc and disabled for individual repos by setting 'repo.enable-stats=0'. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-11-30Set prefix in snapshots when using dwimmeryNatanael Copa1-2/+1
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>
2008-10-11ui-snapshot: add dwimmeryLars Hjemli1-1/+1
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>
2008-09-01Merge branch 'lh/plain'Lars Hjemli1-0/+7
* lh/plain: Supply status description to html_status() ui-tree: link to plain view instead of blob view Implement plain view
2008-09-01Merge branch 'lh/clone'Lars Hjemli1-0/+19
* lh/clone: Add support for cloning over http Conflicts: cmd.c
2008-08-06Implement plain viewLars Hjemli1-0/+7
This implements a way to access plain blobs by path (similar to the tree view) instead of by sha1. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-08-06Add support for cloning over httpLars Hjemli1-0/+19
This patch implements basic support for cloning over http, based on the work on git-http-backend by Shawn O. Pearce. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-08-01Add atom-supportLars Hjemli1-0/+7
This enables a page which generates atom feeds for the current branch and path, heavily inspired by the atom-support in gitweb. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-06-24allow blob extract blobs by head/path combinationMichael Krelin1-1/+1
If blob is invoked with no id=, it tries to look up h= and search for path= in there. Once found, proceed as normal, otherwise, fail as normal. Signed-off-by: Michael Krelin <hacker@klever.net>
2008-05-03Merge branch 'lh/cache'Lars Hjemli1-5/+16
* lh/cache: Add page 'ls_cache' Redesign the caching layer
2008-04-29Add 'about site' and 'about repo' pagesLars Hjemli1-0/+9
This commit uses the options and changes from the last few commits to implement a new 'about' command which works both with and without a repo. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-28Add page 'ls_cache'Lars Hjemli1-5/+16
This new page will list all entries found in the current cache, which is useful when reviewing the new cache implementation. There are no links to the new page, but it's reachable by adding 'p=ls_cache' to any cgit url. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-03-24Add separate header-files for each page/viewLars Hjemli1-0/+11
Yet another step towards removing cgit.h. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-03-24Add command dispatcherLars Hjemli1-0/+101
This simplifies the code in cgit.c and makes it easier to extend cgit with new pages/commands. Signed-off-by: Lars Hjemli <hjemli@gmail.com>