aboutsummaryrefslogtreecommitdiffstats
path: root/stagit-index.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* prefix usage with the common prefix "usage: "Hiltjo Posthuma2022-08-161-1/+1
|
* Revert "remain compatible with slightly older libgit versions for now"Hiltjo Posthuma2022-05-271-2/+0
| | | | | | | | | This reverts commit 70541c5e2cbdc141ba94e76899aba5f07047cecf. Reported by Anton: The last commit[1] is not correct as GIT_OPT_SET_OWNER_VALIDATION is not a preprocessor directive but rather an enum. Causing the branch to never be entered.
* remain compatible with slightly older libgit versions for nowHiltjo Posthuma2022-05-241-0/+2
|
* Allow git to run on an other user repositoryAnton Lindqvist2022-05-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Reported by Anton: "Recent versions of libgit2 broke stagit for me due to the added opt-out GIT_OPT_SET_OWNER_VALIDATION configuration knob. My repositories are owned by root:vcs and I run stagit as another user which happens to be in vcs group but not the owner of the repository. Disabling the validation makes stagit work as expected again." Some notes: When using regular git it also provides a knob. This is due to a security concern in some cases, which is not applicable to stagit. git log somerepo fatal: unsafe repository ('somerepo' is owned by someone else) To add an exception for this directory, call: git config --global --add safe.directory somerepo See also / related: - https://github.blog/2022-04-12-git-security-vulnerability-announced/
* improve stream read and write error handlingHiltjo Posthuma2022-03-191-1/+15
|
* libgit2 config opts: set the search to an empty pathHiltjo Posthuma2022-01-031-0/+4
| | | | | | | Otherwise this would search outside the unveiled paths and cause an unveil violation. Reported by Anton Lindqvist, thanks!
* do not percent-encode: ',' or '-' or '.' it looks uglyHiltjo Posthuma2021-12-141-2/+2
|
* percent encode characters in path namesHiltjo Posthuma2021-11-161-1/+23
| | | | Paths could contain characters like # (fragment), '?', control-characters, etc.
* do not simplify the history by first-parentHiltjo Posthuma2021-05-051-1/+0
| | | | | | | | | | Reference: https://libgit2.org/libgit2/#HEAD/group/revwalk/git_revwalk_simplify_first_parent Noticed on merge commits on: https://git.simple-cc.org/scc/ Reported by quinq, thanks!
* add meta viewport on stagit-index tooHiltjo Posthuma2021-03-191-0/+1
| | | | Patch by Oscar Benedito, thanks!
* micro-optimization: fputc (function) -> putc (macro/inline function)Hiltjo Posthuma2021-01-091-1/+1
|
* stagit-index: remove unveil support for argvHiltjo Posthuma2020-08-081-4/+0
| | | | | This can reach the unveil argument limits and it is not a good case for using unveil.
* improve includes, stagit-index does not need compat.hHiltjo Posthuma2020-02-121-6/+1
|
* small code-style white-space/newlineHiltjo Posthuma2019-12-221-0/+1
|
* add OpenBSD unveil supportHiltjo Posthuma2019-12-011-0/+3
| | | | | | | | | | | | The unveil() system call first appeared in OpenBSD 6.4. For stagit it has the following properties now: - stagit-index: only read-access to the file-system for the specified directories/repositories. - stagit: read-access to the specified directory/repository. read-write and creation access to the current directory for the output files. read-write and creation access to the specified cache file.
* pedantic snprintf() improvementHiltjo Posthuma2019-03-091-1/+1
| | | | | | POSIX says: "If an output error was encountered, these functions shall return a negative value and set errno to indicate the error."
* change order of commits in log from most recent to old to applied orderHiltjo Posthuma2019-02-161-1/+0
|
* fix compile: libgit2 0.28 changed giterr_last to git_error_lastHiltjo Posthuma2019-02-161-3/+1
| | | | | libgit2 commit: https://github.com/libgit2/libgit2/commit/a27a4de6f8003961d38958893c6c637395c7cc04
* assume OpenBSD 5.9+, always try pledge(2) on OpenBSDHiltjo Posthuma2018-05-251-4/+2
|
* stagit-index: pledge after git_libgit2_initHiltjo Posthuma2018-04-061-3/+4
|
* stagit-index: also dont assume someones <html lang> :)Hiltjo Posthuma2017-04-171-1/+1
|
* stagit-index: remove Content-Language: enHiltjo Posthuma2017-04-171-1/+1
| | | | | forgot to remove this from stagit-index aswell, see also: commit 9e96062b620088a42c7b345e07cc8c12e2b59ed2
* stagit-index: remove empty h1 and add bold markup to table headersHiltjo Posthuma2017-04-161-6/+8
|
* browser compatibility: use numeric entity for 'Hiltjo Posthuma2017-04-151-1/+1
| | | | | &apos; is a XHTML entity, browsers such as links, w3m, lynx and dillo don't support it.
* simplify/shorten pledge stubHiltjo Posthuma2017-03-121-5/+1
|
* reduce scope of repodir, remove unused branch parameterHiltjo Posthuma2017-03-121-1/+1
|
* fix joinpath(): use of global 'repodir', should be 'path'Hiltjo Posthuma2016-05-031-12/+12
| | | | use joinpath for another case.
* code cleanupHiltjo Posthuma2016-05-031-5/+3
|
* remove config.h, add options to stagit.cHiltjo Posthuma2016-05-031-1/+0
|
* add OpenBSD pledge(2) support using -DUSE_PLEDGEHiltjo Posthuma2016-05-031-0/+11
|
* fix times (and timezone)Hiltjo Posthuma2016-05-011-9/+3
| | | | | | - in the index and log show the short time (GMT). - in the Atom feed use GMT time. - for commits show the time + offset.
* fix path join '/'Hiltjo Posthuma2016-05-011-23/+19
| | | | add joinpath() function to handle this.
* code cleanup + style, functionally equivalentHiltjo Posthuma2016-05-011-1/+1
|
* fix: check gmtime, can return NULL on errorHiltjo Posthuma2016-04-271-1/+2
|
* resolve absolute paths to repodir, remove basename just use strrchr.Hiltjo Posthuma2016-04-271-28/+9
| | | | | | | - resolve repodir, for example: stagit-index ../ used to use ".." as the name, now it will resolve to the real directory name. - just use strrchr(path, '/') instead of basename, '/' path separator is now used.
* stagit-index: remove unused efopen functionHiltjo Posthuma2016-04-271-11/+0
|
* Use the recommended HTML5 document type.lostd2016-02-261-1/+1
|
* check path truncationHiltjo Posthuma2016-02-241-6/+18
| | | | be strict about it
* strip .git suffix from nameHiltjo Posthuma2016-01-061-7/+7
| | | | also free stripped_name in the case of stagit-index
* extra whitespaceHiltjo Posthuma2016-01-061-1/+1
|
* Be more explicit when stripping the .git suffixsin2016-01-061-1/+2
|
* stagit-index: Strip per repo .git suffix from generated indexsin2016-01-061-1/+9
|
* stagit-index: continue making list, but return error codeHiltjo Posthuma2016-01-051-6/+7
|
* stagit-index: owner is one line, strip newlineHiltjo Posthuma2016-01-051-0/+1
|
* revert log.html to log/head.html changeHiltjo Posthuma2016-01-051-1/+1
|
* fix link in stagit-index, update documentation, add TODOHiltjo Posthuma2016-01-031-1/+1
|
* rename urmoms to stagit, improve documentationHiltjo Posthuma2015-12-261-0/+235