subtree(3p/cgit): merge cgit-pink into depot cgit
cgit-pink is a maintained fork of cgit that follows upstream git more closely and already contains a lot of patches we already had applied. Consequently, it seems sensible it becomes our future upstream, we may even be able to upstream some of our custom, less invasive patches. Change-Id: Ia081e4508866f32298986c7160f4890c8a7c8922
This commit is contained in:
commit
40803d9c6d
39 changed files with 185 additions and 1616 deletions
17
third_party/cgit/tests/filters/dump.lua
vendored
17
third_party/cgit/tests/filters/dump.lua
vendored
|
|
@ -1,17 +0,0 @@
|
|||
function filter_open(...)
|
||||
buffer = ""
|
||||
for i = 1, select("#", ...) do
|
||||
buffer = buffer .. select(i, ...) .. " "
|
||||
end
|
||||
end
|
||||
|
||||
function filter_close()
|
||||
html(buffer)
|
||||
return 0
|
||||
end
|
||||
|
||||
function filter_write(str)
|
||||
buffer = buffer .. string.upper(str)
|
||||
end
|
||||
|
||||
|
||||
19
third_party/cgit/tests/setup.sh
vendored
19
third_party/cgit/tests/setup.sh
vendored
|
|
@ -60,12 +60,6 @@ fi
|
|||
|
||||
FILTER_DIRECTORY=$(cd ../filters && pwd)
|
||||
|
||||
if cgit --version | grep -F -q "[+] Lua scripting"; then
|
||||
export CGIT_HAS_LUA=1
|
||||
else
|
||||
export CGIT_HAS_LUA=0
|
||||
fi
|
||||
|
||||
mkrepo() {
|
||||
name=$1
|
||||
count=$2
|
||||
|
|
@ -144,19 +138,6 @@ repo.email-filter=exec:$FILTER_DIRECTORY/dump.sh
|
|||
repo.source-filter=exec:$FILTER_DIRECTORY/dump.sh
|
||||
repo.readme=master:a+b
|
||||
EOF
|
||||
|
||||
if [ $CGIT_HAS_LUA -eq 1 ]; then
|
||||
cat >>cgitrc <<EOF
|
||||
repo.url=filter-lua
|
||||
repo.path=$PWD/repos/filter/.git
|
||||
repo.desc=filtered repo
|
||||
repo.about-filter=lua:$FILTER_DIRECTORY/dump.lua
|
||||
repo.commit-filter=lua:$FILTER_DIRECTORY/dump.lua
|
||||
repo.email-filter=lua:$FILTER_DIRECTORY/dump.lua
|
||||
repo.source-filter=lua:$FILTER_DIRECTORY/dump.lua
|
||||
repo.readme=master:a+b
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
cgit_query()
|
||||
|
|
|
|||
6
third_party/cgit/tests/t0105-commit.sh
vendored
6
third_party/cgit/tests/t0105-commit.sh
vendored
|
|
@ -11,7 +11,7 @@ test_expect_success 'find commit subject' '
|
|||
grep "<div class=.commit-subject.>commit 5<" tmp
|
||||
'
|
||||
|
||||
test_expect_success 'find commit msg' 'grep "<div class=.commit-msg.></div>" tmp'
|
||||
test_expect_success 'find commit msg' 'grep "<pre class=.commit-msg.></pre>" tmp'
|
||||
test_expect_success 'find diffstat' 'grep "<table summary=.diffstat. class=.diffstat.>" tmp'
|
||||
|
||||
test_expect_success 'find diff summary' '
|
||||
|
|
@ -29,8 +29,8 @@ test_expect_success 'root commit contains diffstat' '
|
|||
'
|
||||
|
||||
test_expect_success 'root commit contains diff' '
|
||||
grep ">diff --git a/file-1 b/file-1<" tmp &&
|
||||
grep "<div class=.add.>+1</div>" tmp
|
||||
grep ">diff --git a/file-1 b/file-1" tmp &&
|
||||
grep "<span class=.add.>+1</span>" tmp
|
||||
'
|
||||
|
||||
test_done
|
||||
|
|
|
|||
4
third_party/cgit/tests/t0106-diff.sh
vendored
4
third_party/cgit/tests/t0106-diff.sh
vendored
|
|
@ -9,11 +9,11 @@ test_expect_success 'find blob link' 'grep "<a href=./foo/tree/file-5?id=" tmp'
|
|||
test_expect_success 'find added file' 'grep "new file mode 100644" tmp'
|
||||
|
||||
test_expect_success 'find hunk header' '
|
||||
grep "<div class=.hunk.>@@ -0,0 +1 @@</div>" tmp
|
||||
grep "<span class=.hunk.>@@ -0,0 +1 @@</span>" tmp
|
||||
'
|
||||
|
||||
test_expect_success 'find added line' '
|
||||
grep "<div class=.add.>+5</div>" tmp
|
||||
grep "<span class=.add.>+5</span>" tmp
|
||||
'
|
||||
|
||||
test_done
|
||||
|
|
|
|||
3
third_party/cgit/tests/t0111-filter.sh
vendored
3
third_party/cgit/tests/t0111-filter.sh
vendored
|
|
@ -4,9 +4,6 @@ test_description='Check filtered content'
|
|||
. ./setup.sh
|
||||
|
||||
prefixes="exec"
|
||||
if [ $CGIT_HAS_LUA -eq 1 ]; then
|
||||
prefixes="$prefixes lua"
|
||||
fi
|
||||
|
||||
for prefix in $prefixes
|
||||
do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue