AgeCommit message (Collapse)AuthorLines
Keep the version numbers off the pagesHEADmainBryce Kwon-6/+3
The generator meta, the footer and the patch signature named the exact cgit and git versions on every response, which only helps someone matching a site against an advisory. The shipped server configs already hide the server's own version for the same reason, and `cgit --version` still answers on the host.
Clean up the whole treeBryce Kwon-10/+5
Trim the comments and dead code across the treeBryce Kwon-19/+30
Collect test scratch output under trash and resultsBryce Kwon-2/+2
Renumber the test scripts into themed rangesBryce Kwon-0/+0
t000x the ground the suite stands on: git version, html validity, the cache t01xx page content, one script per page t02xx features that cut across pages: filters, submodule links, dates, limits t03xx defence, the security regressions and the $HOME promise t04xx the helper tools under tools/
Tidy the test comments and shell portabilityBryce Kwon-0/+7
Add `max-patch-count` to bound the patch viewBryce Kwon-0/+13
Reorganize into source, assets and librariesBryce Kwon-2/+2
The C sources move to source/, the served files to assets/, the bundled Git submodule to libraries/git and the filter scripts to extensions/. Everything the build generates now lands in build/, so a clean is a single remove and the tree stays clean.
ui-patch: match git-format-patch(1) outputJohn Keeping-2/+2
Using (DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH) causes Git to emit a "---" line between the commit message and the body of the patch, which fixes a regression introduced in commit 455b598 (ui-patch.c: Use log_tree_commit() to generate diffs, 2013-08-20), prior to which we inserted the "---" line ourselves. DIFF_FORMAT_SUMMARY is added so that we match the output of git-format-patch(1) without the "-p" option. Signed-off-by: John Keeping <john@keeping.me.uk>
t0108: modernize styleJohn Keeping-10/+10
* &&-chaining * use test_cmp instead of cmp * use strip_headers instead of knowing how many lines there will be Signed-off-by: John Keeping <john@keeping.me.uk>
t0108: Add tests for revision rangesLukas Fleischer-0/+17
Add tests to check whether generating multiple patches at once works. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
t0108: Compare output with git-format-patch(1)Lukas Fleischer-0/+7
Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
ui-patch.c: Add additional newline after each patchLukas Fleischer-2/+2
For consistency with git-format-patch(1). Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
t0108: Avoid unnecessary fork()Lukas Fleischer-1/+1
Use `git rev-list --max-parents=0 HEAD` instead of `git rev-list HEAD | tail -1` to get the root commit. This works since Git 1.7.4.2. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
tests: use Git's test frameworkJohn Keeping-19/+18
This allows tests to run in parallel as well as letting us use "prove" or another TAP harness to run the tests. Git's test framework requires Git to be fully built before letting any tests run, so add a new target to the top-level Makefile which builds all of Git instead of just libgit.a and make the "test" target depend on that. Signed-off-by: John Keeping <john@keeping.me.uk>
tests: make whitespace consistentJohn Keeping-1/+1
Signed-off-by: John Keeping <john@keeping.me.uk>
tests: "grep -e" is not portable to all platformsJohn Keeping-5/+5
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>
tests: handle paths with whitespaceFerry Huberts-1/+1
v2: incorporate remarks of Lukas Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
t0108-patch: add 'tests_done' to endMark Lodato-0/+2
Signed-off-by: Mark Lodato <lodatom@gmail.com>
Fix segfault in patch view for root commitLars Hjemli-0/+37
The code for patch view assumed the current commit would always have a parent, which made cgit segfault when that wasn't the case. This fixes the bug and adds a test-script for patch view which includes a test for the inital commit. Signed-off-by: Lars Hjemli <hjemli@gmail.com>