summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2013-04-08 21:12:19 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2013-04-08 21:43:26 +0200
commit8a92df033e974af6338b530a0d78d1bdb0b0f918 (patch)
treeea7968f81170a9ed83b50f544036da78b1b8490c /tests
parentfb3655df3bf85bd405c5921bbd4b3a54c705c839 (diff)
downloadcgit-8a92df033e974af6338b530a0d78d1bdb0b0f918.tar.gz
cgit-8a92df033e974af6338b530a0d78d1bdb0b0f918.tar.bz2
cgit-8a92df033e974af6338b530a0d78d1bdb0b0f918.zip
Do not load user or system gitconfig and gitattributes
While doing any kind of git loading, unset HOME variables and set NOSYSTEM variables so that cgit does not load any settings that a user may have set for his own /usr/bin/git usage. This fixes a fatal error introduced with git 1.8, whereupon git would fatally exit when failing to access particular files. The result of this is that only repo-local configuration files are accessed: zx2c4@thinkpad ~/Projects/cgit $ HOME=/root QUERY_STRING="url=foo/log" CGIT_CONFIG=tests/trash/cgitrc strace -e access ./cgit >/dev/null access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) access("repos/foo/.git/objects", X_OK) = 0 access("repos/foo/.git/refs", X_OK) = 0 access("repos/foo/.git/config", R_OK) = 0 access("repos/foo/.git/config", R_OK) = 0 access("repos/foo/.git/objects/b3/bafdbf0183f4897ef8b1319cb8c490ed54717e", F_OK) = 0 access("repos/foo/.git/objects/b3/bafdbf0183f4897ef8b1319cb8c490ed54717e", F_OK) = 0 access("repos/foo/.git/objects/b3/bafdbf0183f4897ef8b1319cb8c490ed54717e", F_OK) = 0 access("repos/foo/.git/objects/b3/bafdbf0183f4897ef8b1319cb8c490ed54717e", F_OK) = 0 +++ exited with 0 +++ Reported-by: Ferry Huberts <ferry.huberts@pelagic.nl> Tested-by: Jason A. Donenfeld <Jason@zx2c4.com> Tested-by: Ferry Huberts <ferry.huberts@pelagic.nl> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions
td>3-0/+34 2022-02-01Use our version of giuRené 'Necoro' Neumann2-2/+4 2022-02-01go mod tidyRené 'Necoro' Neumann2-4/+3 2022-02-01Use up2date giuRené 'Necoro' Neumann1-1/+1 2022-02-01GUI: GridLayoutRené 'Necoro' Neumann1-2/+62 2022-01-29[release]: Move checkout to the frontRené 'Necoro' Neumann1-3/+3 2022-01-29[release]: Make Windows build link staticRené 'Necoro' Neumann1-1/+1 2022-01-29[release]: Fix multiple issuesRené 'Necoro' Neumann1-10/+8 2022-01-29Start with a basic GUIRené 'Necoro' Neumann4-2/+73 2022-01-29[release]: Fix github variable syntaxRené 'Necoro' Neumann1-2/+2 2022-01-29Build on windows and linuxRené 'Necoro' Neumann1-6/+9 2022-01-29Build on windows and linuxRené 'Necoro' Neumann1-45/+58 2022-01-25const blockRené 'Necoro' Neumann1-3/+5 2022-01-25Slight restructuringRené 'Necoro' Neumann2-84/+93 2022-01-24Add test stuff to .gitignoreRené 'Necoro' Neumann1-1/+7 2022-01-24Factor out `writeOutput`René 'Necoro' Neumann1-15/+15 2022-01-24Create clubs and participants files also via templateRené 'Necoro' Neumann4-113/+63