aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
...
* t0107-snapshot: add tests for ZIP archives•••Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-03-041-2/+37
* tests: make whitespace consistent•••Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-03-043-14/+17
* tests: "grep -e" is not portable to all platforms•••The "-e" option to grep is not needed unless specifying more than one pattern, which we don't do. Remove it to avoid restricting the tests on platforms that do not have a grep that recognises "-e". Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-03-048-55/+55
* Makefile: Disable gettext in the Git submodule•••Newer libgit versions depend on the libintl library. However, we currently do not link against libintl which breaks compilation under OpenBSD: git/libgit.a(commit.o)(.text+0x1d1b): In function `lookup_commit_or_die': git/gettext.h:47: undefined reference to `libintl_gettext' [...] Since we do not support i18n in cgit, just disable gettext in the Git submodule to fix this. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-1/+1
* Makefile: improve dependency generation•••Makefile target generation would always be included for any makefile target that was not clean. Only care to include the '.deps' directory when building cgit, rather than generating and including dependencies when calling other makefile targets. Heavily borrowed from git's Makefile, but without definitions to test for the compiler's header dependency feature. Previous Makefile implementation never checked for this compiler feature anyway. - Removed makecmdgoal 'clean' check - Grouped like .PHONY target definitions - Place build dependency targets under .SUFFIXES - Re-arranged location of library inclusion definitions - Use google code mirror instead of github Signed-off-by: Jamie Couture <jamie.couture@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Jamie Couture2013-03-041-70/+82
* cgit.c: Remove parameter from guess_defbranch()•••We use resolve_ref() since commit 8d7c2ec2, so this is no longer needed. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-2/+2
* ui-tree.c: Use a context structure in walk_tree()•••Use the context pointer to pass context information instead of misusing global variables, as we already did in "ui-blob.c" and in "ui-plain.c". In addition to the fixes to walk_tree(), pass the same structure to ls_tree() and ls_item() which is read_tree_recursive()-based as well. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-22/+29
* ui-tree.c: Drop the header variable•••Instead, use the value of the state variable to determine whether the footer needs to be drawn. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-6/+2
* ui-tree.c: Declare the state variable globally•••This allows for removing the header variable in a following patch. We can use the state variable to check whether the tail needs to be printed instead. Note that the state variable will be moved into a context structure later. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-1/+2
* ui-tree.c: Pass current revision to print_object()•••No longer access the global curr_rev variable in print_object(). This will make it easier to squash the curr_rev variable into a context structure without having to pass the context to the print_object() function. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-3/+3
* ui-plain.c: Use a context structure in walk_tree()•••Do not misuse global variables to save the context. Instead, use the context pointer which was designed to share information between a read_tree_fn and the caller. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-13/+20
* ui-plain.c: Do not access match variable in print_*()•••Move all code setting the match variable to walk_tree(). This allows for easily moving this variable into a context structure without having to pass the context to print_*(). Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-12/+14
* ui-blob.c: Use a context structure in walk_tree()•••Do not misuse global variables to save the context. Instead, use the context pointer which was designed to share information between a read_tree_fn and the caller. This also prevents from potential misuse of the global pointers match_path and matched_sha1 after the referenced values have been overwritten on the stack. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-16/+26
* ui-snapshot.c: Fill argv[0] with dummy.•••parse_archive_args does not pass PARSE_OPT_KEEP_ARGV0 to parse_args, which means the first argument will be discarded, as though it were a function being called from the command-line. Thus, we fill argv[0] with a dummy argument to prevent this from happening. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Jason A. Donenfeld2013-03-041-0/+1
* White space around control verbs.•••Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Jason A. Donenfeld2013-03-0416-42/+42
* Fix several whitespace errors•••* Remove whitespace at the end of lines. * Replace space indentation by tabs. * Add whitespace before/after several operators ("+", "-", "*", ...) * Add whitespace to assignments ("foo = bar;"). * Fix whitespace in parameter lists ("foobar(foo, bar, 42)"). Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-0414-99/+99
* Update git to v1.7.12.4•••No changes needed. Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-03-021-0/+0
* Update git to v1.7.9.7•••resolve_ref() is renamed to resolve_ref_unsafe(). CGit's usage is safe. Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-03-022-1/+1
* Update git to v1.7.8.6•••No changes required. Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-03-021-0/+0
* Update git to v1.7.7.7•••This release changes the archive interface so that we now need to pass argv into write_archive(). Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-03-023-25/+38
* Update git to v1.7.6.5•••struct pathspec is now used in more places. Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-03-024-12/+43
* Update git to v1.7.5.4•••Some changes to diff options: - no_merges has become the more general max_parents - path restriction now uses struct pathspec Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-03-023-6/+6
* Print submodule revision next to submodule linkstfn2013-03-021-0/+1
* Support unannotated tags in git-clone.•••Matthew McClintock reported that older unannotated tags were not correctly being cloned and did not appear in info/refs. Further investigation revealed some dubious prefix comparison code for determining whether or not to write refs in info/refs. After comparing it with git's own http-backend.c, it appears upstream does not use this prefix logic. OTOH, I don't know what the reasoning was when the prefix logic was introduced. It appears to me to just be buggy, though it's possible there are other reasons, and we'll have to revisit this commit. But for now, Works For Me. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Matthew McClintock <msm@freescale.com> Reported-by: Matthew McClintock <msm@freescale.com> Jason A. Donenfeld2013-02-011-4/+2
* ssdiff: correctly manage tab expansion•••Previously, replace_tabs("foo\tbar") would become " foobar". Signed-off-by: Julius Plenz <plenz@cis.fu-berlin.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Julius Plenz2013-02-011-2/+1
* Make "owner" column on index page configurable•••This is not really needed for personal sites where all repos belong to the same person. Since it is pretty useful for shared sites however, it should be configurable. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Florian Pritz2013-02-014-7/+20
* man: fix up default value duplicationJason A. Donenfeld2012-11-151-2/+2
* CGIT-0.9.1•••Enhancements: - path-selected submodule links - intelligent default branch guessing - /etc/mime.types lookup - gitweb.* and cgit.* git-config support - case insensitive sorting and age sorting - commit, repository, and section sorting - bold currently viewed page in pagination - support BSDs in makefile Security: - CVE-2012-4465: heap-buffer overflow in parsing.c - CVE-2012-4548: syntax highlighting command injection Bug Fixes: - transition maintainer to Jason Donenfeld (zx2c4) - download git snapshot from github instead of Lars' old server - css fixes - stablization of tests - more compatible default highlight script - suppress gzip timestamp so that tarballs only use tar timestamps - treat ctags as target in makefile - do not let global variables override certain local repo settings - print ampersand as proper html entity - use placeholder for empty commit subject - format diff view for addition and removal of files - point links at correct blob from ssdiff Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Jason A. Donenfeld2012-11-151-1/+1
* man: show mime type default valueJason A. Donenfeld2012-11-151-0/+1
* ssdiff: point line links at exact blob by prepending "id="•••Previously, the id_str (i.e. the current or diffed-against commit's SHA1 ID) was simply concatenated to the URL. Now, prepend an "id=" string so that the links actually point to the right blobs and thus the exact lines. Signed-off-by: Julius Plenz <plenz@cis.fu-berlin.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Julius Plenz2012-11-151-2/+2
* Format git diff headers correctly when adding or removing files.•••Copying the output of cgit and using it in patches now works when adding files to or removing files from the repository. This is helpful for people who use cgit in their patch workflow. Michael Halstead2012-11-152-14/+22
* Makefile: get snapshots from github•••Github will have more bandwidth than Lars' server. Ferry Huberts2012-11-041-2/+2
* Makefile: remove tags file•••Remove tags file from working directory. Signed-off-by: Jamie Couture <jamie.couture@gmail.com> Jamie Couture2012-10-311-1/+1
* ui-shared: use placeholder for empty commit subject•••Display a placeholder when creating links to commits with empty subjects. This avoids the creation of links of the form <a></a>. Christian Franke2012-10-281-1/+4
* syntax-highlighting.sh: Fix command injection.•••By not quoting the argument, an attacker with the ability to add files to the repository could pass arbitrary arguments to the highlight command, in particular, the --plug-in argument which can lead to arbitrary command execution. This patch adds simple argument quoting. Jason A. Donenfeld2012-10-271-2/+2
* Fix man page typo.Jason A. Donenfeld2012-10-181-2/+2
* Makefile: Support OpenBSD just like FreeBSDJason A. Donenfeld2012-10-171-2/+2
* Makefile: support FreeBSD libiconv paths•••According to Dan Rue <drue@therub.org>, FreeBSD requires the lib paths to get libiconv from /usr/local. Jason A. Donenfeld2012-10-171-0/+7
* tests: check for proper html entity•••Since we're now properly writing ampersand literals as &amp; instead of as a plain &, we need to update the test accordingly. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Jason A. Donenfeld2012-10-171-1/+1
* ui-log: Add "commit-sort" option for controlling commit ordering•••This makes it possible to use strict commit date ordering or strict topological ordering by passing the corresponding flags to "git log". Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Tobias Bieniek2012-10-178-6/+40
* ui-repolist: Add "section-sort" flag to control section sorting.•••Flag which, when set to "1", will sort the sections on the repository listing by name. Set this flag to "0" if the order in the cgitrc file should be preserved. Default value: "1". Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Tobias Bieniek2012-10-174-3/+13
* scan-tree: Unify gitweb.* and cgit.* settings into one config option.•••After some back and forth with Jamie and RenĂ©, it looks like the git config semantics are going to be like this: - gitweb.category maps to the cgit repo config key "section" - gitweb.description maps to the cgit repo config key "desc" - gitweb.owner maps to the cgit repo config key "owner" - cgit.* maps to all cgit repo config keys This option can be enabled with "enable-git-config=1", and replaces all previous "enable-gitweb-*" config keys. The order of operations is as follows: - git config settings are applied in the order that they exist in the git config file - if the owner is not set from git config, get the owner using the usual getpwuid call - if the description is not set from git config, look inside the static $path/description file - if section-from-path=1, override whatever previous settings were inside of git config using the section-from-path logic - parse $path/cgitrc for local repo.* settings, that override all previous settings Jason A. Donenfeld2012-10-175-58/+36
* ui: Remember to print ampersand as proper html entities.William Bell2012-10-172-8/+8
* ui-repolist: Rename section-sort to repository-sort.•••Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Jason A. Donenfeld2012-10-164-7/+7
* repo_config: do not let globals override repo settings•••This makes it possible to activate the enable_commit_graph, enable_log_filecount, and enable_log_linecount for individual repositories, even if the global setting is "0" (default). The commit that introduced the broken behavior was e189344, and the commit message of that makes it clear that this wasn't the intended behavior. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Tobias Bieniek2012-10-161-3/+3
* README: times, they are a-changinJason A. Donenfeld2012-10-091-1/+1
* syntax-highlight: when the file has no extension, assume text•••There are 2 situations: 1- empty extension: assuming text is better than highlight producing no output because of a missing argument. 2- no extension at all: assuming text is better than setting the extension to the filename, which is what now happens. Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> Ferry Huberts2012-10-091-1/+4
* ui-repolist: do not use agefile if it's date could not be parsed•••Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> Ferry Huberts2012-10-091-2/+4
* Revert "filters/syntax-highlighting.sh: work around highlight --force bug"•••This reverts commit f50be7fda0a7ab57009169dd5905fcbab8eb5166. An update with the latest highlight landed in EPEL. This new version doesn't have the --force bug, so the workaround can now be removed. Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> Ferry Huberts2012-10-091-17/+0
* Makefile: add tag target to generate ctags•••Signed-off-by: Jamie Couture <jamie.couture@gmail.com> Jamie Couture2012-10-081-1/+5