Website Summary Files Commits Branches @commit @diff @stats
path: root / parsing.c
Commit message (Collapse)AuthorAgeLinesSHA
* Move cgit_parse_query() from parsing.c to html.c as http_parse_querystring()
 Lars Hjemli
2008-04-08-49/+0e87e896
| | | | | | This is a generic http-function. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Move function for configfile parsing into configfile.[ch]
 Lars Hjemli
2008-03-28-75/+020a3354
| | | | | | This is a generic function which wanted its own little object file. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add command dispatcher
 Lars Hjemli
2008-03-24-2/+2e0e4478
| | | | | | | 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>
* Move cgit_repo into cgit_context
 Lars Hjemli
2008-02-16-8/+8d1f3bbe
| | | | | | | | 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_context
 Lars Hjemli
2008-02-16-4/+4d14d77f
| | | | | | | | | 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>
* Merge branch 'stable'
 Lars Hjemli
2007-12-02-3/+3dabb34a
|\ | | | | | | | | | | * stable: Handle missing timestamp in commit/tag objects Set commit date on snapshot contents
| * Handle missing timestamp in commit/tag objects
 Lars Hjemli
2007-12-02-3/+3fc4c4ba
| | | | | | | | | | | | | | | | | | | | When a commit or tag lacks author/committer/tagger timestamp, do not skip the next line in the commit/tag object. Also, do not bother to print timestamps with value 0 as it is close to certain to be bogus. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Use utf8::reencode_string from git
 Lars Hjemli
2007-11-05-60/+4a2ebbd6
| | | | | | | | | | | | | | This replaces the iconv-support in cgit with similar functions already existing in git. Signed-off-by: Lars Hjemli <hjemli@gmai.com>
* | Convert subject and message with iconv_msg.
 Jonathan Bastien-Filiatrault
2007-11-05-0/+147858a30
| |
* | Add iconv_msg function.
 Jonathan Bastien-Filiatrault
2007-11-05-0/+58af08198
| |
* | Set msg_encoding according to the header.
 Jonathan Bastien-Filiatrault
2007-11-05-0/+8aa5cc32
| |
* | Add commit->msg_encoding, allocate msg dynamicly.
 Jonathan Bastien-Filiatrault
2007-11-05-0/+13845e17
|/
* cgit_parse_commit(): Add missing call to xstrdup()
 Lars Hjemli
2007-10-27-2/+2c61360f
| | | | | | | It's rather silly to point into random memory-locations. Also, remove a call to strdup() used on a literal char *. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Skip unknown header fields when parsing tags and commits
 Lars Hjemli
2007-10-27-0/+613d2b0b
| | | | | | | | Both the commit- and tagparser failed to handle unexpected header fields. This adds futureproofing by simply skipping any header we don't know/care about. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add trim_end() and use it to remove trailing slashes from repo paths
 Lars Hjemli
2007-06-26-1/+1382805e
| | | | | | | | The new function removes all trailing instances of an arbitrary character from a copy of the supplied char array. This is then used to remove any trailing slashes from cgit_query_path. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Check for NULL commit buffer in cgit_parse_commit()
 Ondrej Jirman
2007-05-31-0/+36130231
| | | | | | This can be NULL, so try not to segfault. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Handle single-line and empty commit subjects
 Ondrej Jirman
2007-05-31-3/+83ce6fc1
| | | | | | | | | | If commit object ends with \0 after subject line, then info->subject was not set. This commit fixes this and also sets subject to ** empty ** if it would otherwise be empty, so that there is something to click on. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Don't be fooled by trailing '/' in url-parameter
 Lars Hjemli
2007-05-18-1/+23de63b2
| | | | | | | | cgit_parse_url() didn't check if the path-part of urls contained a real path or just a trailing slash. This made the log-page die since the path filtering supplied an invalid path argument. This fixes it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Enable url=value querystring parameter
 Lars Hjemli
2007-05-18-0/+4330ccdca
| | | | | | | This makes is possible to use repo-urls like '/pub/scm/git/git.git' and even add path specifications, like '/pub/scm/git/git.git/log/documentation'. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Restrict deep nesting of configfiles
 Lars Hjemli
2007-05-15-4/+647a81c7
| | | | | | | | | | | | There is no point in restricting the number of included config- files, but there is a point in restricting the nestinglevel of configfiles: to avoid recursive inclusions. This is easily achieved by decrementing the static nesting-variable upon exit from cgit_read_config(). Also fix some whitespace breakage. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add include-parameter to config files
 Lars Hjemli
2007-05-14-6/+85ec6e02
| | | | | | | | | This parameter can be used to include another config-file, like a standalone repository listing. Suggested in a patch by Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Update to libgit 1.5.2-rc2
 Lars Hjemli
2007-05-08-3/+361c3ca9
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Do not die if tag has no message
 Lars Hjemli
2007-02-04-2/+2ebd7b0f
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add function cgit_parse_tag()
 Lars Hjemli
2007-01-17-0/+47a69061f
| | | | | | Teach cgit how to extract author info from a tag. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Handle empty/malformed commit messages
 Lars Hjemli
2007-01-16-6/+1366091f9
| | | | | | | An empty commit message would trigger a segfault in the current cgit_parse_commit(). Also, make sure that all char-pointers are properly initialized.
* Handle %xx encoding in querystring
 Lars Hjemli
2007-01-04-0/+2152e605c
| | | | | | | Convert valid %xx expressions in querystring to ascii, ignore invalid expressions (i.e. eat the three characters %xx). Signed-off-by: Lars Hjemli <larsh@hal-2004.(none)>
* Handle '+' in querystring
 Lars Hjemli
2006-12-28-0/+205b1319
| | | | | | Translate '+' to ' ' in querystring parser (still doesn't handle %xx) Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Teach commit parser about author/committer email + timestamp
 Lars Hjemli
2006-12-16-2/+1077078ba
| | | | | | | | | | | We want all four of these when showing a commit, so save them in the commitinfo struct. Btw: There's probably no good reason to save committer timestamp since it's already available in commit->date. But it doesn't hurt us either, and it makes the parser look more complete, so we just do it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add ui-commit.c + misc ui cleanups
 Lars Hjemli
2006-12-16-0/+19a8f886
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add a common commit parser
 Lars Hjemli
2006-12-15-0/+532101e26
| | | | | | Make a better commit parser, replacing the ugly one in ui-log.c Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Rename config.c to parsing.c + move cgit_parse_query from cgit.c to parsing.c
 Lars Hjemli
2006-12-11-0/+10651ada4f
Signed-off-by: Lars Hjemli <hjemli@gmail.com>