Hiltjo Posthuma [Wed, 5 May 2021 17:15:58 +0000 (19:15 +0200)]
do not simplify the history by first-parent
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!
Hiltjo Posthuma [Thu, 25 Mar 2021 17:17:34 +0000 (18:17 +0100)]
tiny comment change
Hiltjo Posthuma [Thu, 25 Mar 2021 17:13:13 +0000 (18:13 +0100)]
add function to print a single line, ignoring \r and \n
This can happen when there is no newline at end of file in the diff which is
served by libgit2 as:
"\n\ No newline at end of file\n".
Hiltjo Posthuma [Fri, 19 Mar 2021 10:29:53 +0000 (11:29 +0100)]
add meta viewport on stagit-index too
Patch by Oscar Benedito, thanks!
Hiltjo Posthuma [Sun, 14 Mar 2021 15:23:58 +0000 (16:23 +0100)]
bump version to 0.9.5
Hiltjo Posthuma [Fri, 5 Mar 2021 11:47:08 +0000 (12:47 +0100)]
LICENSE: update
Hiltjo Posthuma [Fri, 5 Mar 2021 11:44:48 +0000 (12:44 +0100)]
change STAGIT_BASEURL to an -u option and also update the example script
Hiltjo Posthuma [Fri, 5 Mar 2021 10:51:21 +0000 (11:51 +0100)]
add $STAGIT_BASEURL environment variable to make Atom links absolute
With feedback from adc, thanks!
Hiltjo Posthuma [Fri, 5 Mar 2021 10:50:16 +0000 (11:50 +0100)]
README: mention tags.xml feature
Hiltjo Posthuma [Sat, 9 Jan 2021 13:59:53 +0000 (14:59 +0100)]
micro-optimization: fputc (function) -> putc (macro/inline function)
Hiltjo Posthuma [Fri, 8 Jan 2021 13:32:33 +0000 (14:32 +0100)]
LICENSE: bump year
Hiltjo Posthuma [Sat, 28 Nov 2020 11:28:05 +0000 (12:28 +0100)]
fix warning with libgit2 v0.99+, remain compatible with older versions
git_blob_rawsize now returns with git_object_size_t (unsigned). This was
git_off_t (signed).
In my current version 1.1.0:
types.h:typedef uint64_t git_object_size_t;
v0.28.5:
https://libgit2.org/libgit2/#v0.28.5/group/blob/git_blob_rawsize
changed from v0.99 onwards:
https://libgit2.org/libgit2/#v0.99.0/group/blob/git_blob_rawsize
Fix: use size_t to remain compatible (with a possible warning in older
versions), since git_object_size_t is a new defined type.
This assumes size_t is atleast uint32_t / uint64_t size.
Adapted from a patch by Augustin Fabre <augustin@augfab.fr>, thanks!
Oscar Benedito [Mon, 16 Nov 2020 22:24:32 +0000 (23:24 +0100)]
add abbreviated commit hash to submodule file
Hiltjo Posthuma [Sun, 15 Nov 2020 20:11:46 +0000 (21:11 +0100)]
add meta viewport for scaling on mobile
Patch by Augustin Fabre <augustin@augfab.fr>
Hiltjo Posthuma [Sun, 15 Nov 2020 20:11:10 +0000 (21:11 +0100)]
style.css: improve contrast
https://webaim.org/resources/contrastchecker/?fcolor=555555&bcolor=FFFFFF
Patch by Augustin Fabre <augustin@augfab.fr> and adapted.
Hiltjo Posthuma [Sun, 15 Nov 2020 19:59:34 +0000 (20:59 +0100)]
use size_t to count lines
Hiltjo Posthuma [Sun, 15 Nov 2020 19:58:58 +0000 (20:58 +0100)]
avoid shadowed `name' global variable
by Augustin Fabre <augustin@augfab.fr>
Hiltjo Posthuma [Sun, 15 Nov 2020 19:58:41 +0000 (20:58 +0100)]
refs_cmp: remove unneeded cast
Hiltjo Posthuma [Sun, 15 Nov 2020 19:58:02 +0000 (20:58 +0100)]
use LEN() macros for arrays
from Augustin Fabre <augustin@augfab.fr>
Hiltjo Posthuma [Mon, 17 Aug 2020 14:09:33 +0000 (16:09 +0200)]
bump version to 0.9.4
Hiltjo Posthuma [Mon, 10 Aug 2020 14:09:46 +0000 (16:09 +0200)]
fix a small memleak in writeatom()
non-tag references were not freed.
Hiltjo Posthuma [Sat, 8 Aug 2020 18:01:05 +0000 (20:01 +0200)]
stagit-index: remove unveil support for argv
This can reach the unveil argument limits and it is not a good case for using
unveil.
kst [Wed, 5 Aug 2020 22:11:18 +0000 (22:11 +0000)]
fix submodule lookup in bare repos
git_submodule_lookup does not work without a working tree [1], so the
current approach fails to recognize any submodules in bare repos.
Instead, notice that
$ git ls-tree HEAD
lists any submodules as commit objects regardless of a working tree.
This is the only instance commit object is used in a tree, so we will
use this to check for submodules.
[1]: https://github.com/libgit2/libgit2/pull/4305/files
Hiltjo Posthuma [Mon, 20 Jul 2020 12:15:12 +0000 (14:15 +0200)]
regression: do not show unset or empty tags
Hiltjo Posthuma [Sun, 19 Jul 2020 14:41:10 +0000 (16:41 +0200)]
refactor get reference, add another feed for tags/releases
A separate Atom feed is helpful to ports maintainers to monitor new
tags/releases.
Hiltjo Posthuma [Sun, 19 Jul 2020 12:07:54 +0000 (14:07 +0200)]
sort branches and tags by time (descending)
In general version tags are done in chronological order, so this will have a
better sorting for tagged (versioned) releases.
Request from Caltlgin Stsodaat and others, thanks!
Hiltjo Posthuma [Sun, 23 Feb 2020 19:30:46 +0000 (20:30 +0100)]
bump version to 0.9.3
Hiltjo Posthuma [Fri, 21 Feb 2020 12:46:23 +0000 (13:46 +0100)]
atom.xml: improve output format a bit
Hiltjo Posthuma [Wed, 12 Feb 2020 22:20:25 +0000 (23:20 +0100)]
improve includes, stagit-index does not need compat.h
Hiltjo Posthuma [Sun, 29 Dec 2019 18:02:04 +0000 (19:02 +0100)]
style.css: highlight anchor ids, useful for linking highlighting lines in a diff
Hiltjo Posthuma [Sun, 22 Dec 2019 11:53:54 +0000 (12:53 +0100)]
small code-style white-space/newline
Hiltjo Posthuma [Sun, 1 Dec 2019 17:31:07 +0000 (18:31 +0100)]
add OpenBSD unveil support
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.
Hiltjo Posthuma [Sun, 1 Dec 2019 17:26:27 +0000 (18:26 +0100)]
some README tweaks and rewording, reordering
Hiltjo Posthuma [Sun, 1 Dec 2019 17:26:04 +0000 (18:26 +0100)]
Makefile improvements
- remove double -c in .c.o target.
- remove config.mk abstraction.
- change LIBS and INCS to LIBGIT_INC and LIBGIT_LIB.
- use system cflags and ldflags, but allow the same override rules for porters.
Leonardo Taccari [Sun, 5 May 2019 17:11:36 +0000 (19:11 +0200)]
README: works also on NetBSD
Hiltjo Posthuma [Tue, 23 Apr 2019 18:53:05 +0000 (20:53 +0200)]
bump version to 0.9.2
Hiltjo Posthuma [Sat, 16 Mar 2019 12:07:58 +0000 (13:07 +0100)]
escape HTML in paths
- escape paths in diff line.
- escape path in anchor href attribute in files.html
Hiltjo Posthuma [Sat, 9 Mar 2019 11:39:10 +0000 (12:39 +0100)]
pedantic snprintf() improvement
POSIX says:
"If an output error was encountered, these functions shall return a negative
value and set errno to indicate the error."
Hiltjo Posthuma [Fri, 1 Mar 2019 10:49:29 +0000 (11:49 +0100)]
fix issues in example scripts
- in case cd fails don't continue (don't write in previous directory).
- post-receive: quote $(pwd) in case it has spaces.
found by shellcheck tool.
Hiltjo Posthuma [Fri, 22 Feb 2019 10:13:44 +0000 (11:13 +0100)]
bump version to 0.9.1
Hiltjo Posthuma [Sat, 9 Feb 2019 14:02:38 +0000 (15:02 +0100)]
Makefile: add DOCPREFIX for installing docs in ports
change installed doc from /usr/local/share/stagit to /usr/local/share/doc/stagit
Hiltjo Posthuma [Thu, 7 Feb 2019 20:00:06 +0000 (21:00 +0100)]
change order of commits in log from most recent to old to applied order
Hiltjo Posthuma [Sun, 3 Feb 2019 14:24:34 +0000 (15:24 +0100)]
fix compile: libgit2 0.28 changed giterr_last to git_error_last
libgit2 commit:
https://github.com/libgit2/libgit2/commit/
a27a4de6f8003961d38958893c6c637395c7cc04
Hiltjo Posthuma [Tue, 25 Dec 2018 12:44:02 +0000 (13:44 +0100)]
bump version to 0.9
Hiltjo Posthuma [Tue, 25 Dec 2018 12:39:34 +0000 (13:39 +0100)]
style: keep default browser style for links, except patch chunks
This is almost always an underline. This improves accessibility.
Remove underline for patch chunks for readability.
Hiltjo Posthuma [Sun, 18 Nov 2018 17:08:20 +0000 (18:08 +0100)]
in the diffstat prefix the type of change, allow CSS styling
Hiltjo Posthuma [Sun, 18 Nov 2018 17:07:22 +0000 (18:07 +0100)]
don't use a heuristic for renames, the content must match exactly
this prevents showing files as renames when most (but not all) of the file was
changed.
Hiltjo Posthuma [Sun, 18 Nov 2018 17:06:41 +0000 (18:06 +0100)]
detect filetype changes in diff (for example a normal file to symlink)
Hiltjo Posthuma [Sun, 11 Nov 2018 17:23:28 +0000 (18:23 +0100)]
detect more names for README and LICENSE
- for license: LICENSE, LICENSE.md, COPYING.
- for readme: README, README.md.
Hiltjo Posthuma [Sun, 11 Nov 2018 17:09:27 +0000 (18:09 +0100)]
detect copies and renames based on the threshold of changes
Hiltjo Posthuma [Sun, 19 Aug 2018 20:03:45 +0000 (22:03 +0200)]
simplify range check
Hiltjo Posthuma [Sun, 19 Aug 2018 12:06:19 +0000 (14:06 +0200)]
stagit: log: indicate when using the -l option and there are more commits
Hiltjo Posthuma [Fri, 25 May 2018 16:43:36 +0000 (18:43 +0200)]
assume OpenBSD 5.9+, always try pledge(2) on OpenBSD
Quentin Rameau [Wed, 9 May 2018 16:51:08 +0000 (18:51 +0200)]
Clarify usage regarding -c and -l mutual exclusion
Hiltjo Posthuma [Sat, 7 Apr 2018 12:14:35 +0000 (14:14 +0200)]
bump version to 0.8
Hiltjo Posthuma [Fri, 6 Apr 2018 17:28:05 +0000 (19:28 +0200)]
stagit-index: pledge after git_libgit2_init
Hiltjo Posthuma [Mon, 26 Mar 2018 18:08:19 +0000 (20:08 +0200)]
pledge after git_libgit2_init
this is because libgit uses curl which uses some initialization
checks, namely an IPv6 check which creates a socket.
Hiltjo Posthuma [Sun, 18 Mar 2018 14:34:37 +0000 (15:34 +0100)]
optimization: only diff the tree when it is needed for the diffstat...
... also clear all fields in the structure on failure.
This is not as big an optimization as stagit-gopher, because the diffstat is
displayed in the log, but the difference is still measurable.
Hiltjo Posthuma [Sun, 28 Jan 2018 15:27:10 +0000 (16:27 +0100)]
README: improve tarball generation by tag example
- set the project name + '-' + tag name as prefix.
- allow '/' in the tag name.
- allow '-' as suffix in the tag.
Hiltjo Posthuma [Sun, 21 Jan 2018 15:47:10 +0000 (16:47 +0100)]
stagit: add -l option: limit the amount of commits for the log.html file
Hiltjo Posthuma [Sun, 21 Jan 2018 14:23:21 +0000 (15:23 +0100)]
bump LICENSE to 2018
Hiltjo Posthuma [Sat, 20 Jan 2018 12:18:27 +0000 (13:18 +0100)]
style.css: improve compatibility with older browsers, namely dillo
Quentin Rameau [Sat, 2 Dec 2017 18:04:22 +0000 (19:04 +0100)]
Remove a non-portable syntax in Makefile
Hiltjo Posthuma [Sat, 25 Nov 2017 15:06:26 +0000 (16:06 +0100)]
Makefile: bump version to 0.7.2
Hiltjo Posthuma [Sat, 25 Nov 2017 15:02:24 +0000 (16:02 +0100)]
post-receive: fix warning in script for example when pushing deleted tags
the "new" variable would be zero:
remote: fatal: bad object
0000000000000000000000000000000000000000
NOTE: when pushing new tags the "old" variable would be zero, this was
already fixed.
Aaron Marcher [Sat, 25 Nov 2017 11:09:56 +0000 (12:09 +0100)]
Sort style.css in alphabetical order
Hiltjo Posthuma [Sun, 19 Nov 2017 13:58:15 +0000 (14:58 +0100)]
Makefile: bump version to 0.7.1
Hiltjo Posthuma [Sun, 19 Nov 2017 13:52:04 +0000 (14:52 +0100)]
fix: add "fattr" pledge for chmod(2) for cachefile
improve checks for when head is NULL (empty repo)
Hiltjo Posthuma [Sat, 18 Nov 2017 11:53:08 +0000 (12:53 +0100)]
Makefile: bump version to 0.7
Hiltjo Posthuma [Sat, 11 Nov 2017 00:34:50 +0000 (01:34 +0100)]
Makefile: remove unused $SCRIPTS
Hiltjo Posthuma [Fri, 10 Nov 2017 19:55:20 +0000 (20:55 +0100)]
fix file permissions for cachefile and respect umask(2)
Hiltjo Posthuma [Fri, 10 Nov 2017 19:53:46 +0000 (20:53 +0100)]
more verbose errors: show which file failed on open
Hiltjo Posthuma [Tue, 31 Oct 2017 22:25:35 +0000 (23:25 +0100)]
README: clarify some cons
Hiltjo Posthuma [Tue, 31 Oct 2017 22:20:18 +0000 (23:20 +0100)]
post-receive hook: force UTF-8 locale
this fixes encoding errors when the pages are generated in the
post-receive hook.
Hiltjo Posthuma [Mon, 4 Sep 2017 16:14:52 +0000 (18:14 +0200)]
allow umask to handle permissions
Hiltjo Posthuma [Wed, 9 Aug 2017 16:52:53 +0000 (18:52 +0200)]
ignore object
0000000000000000000000000000000000000000
remote: fatal: bad object
0000000000000000000000000000000000000000
this can happen on initial repos or when pushing tags etc.
Hiltjo Posthuma [Wed, 2 Aug 2017 16:54:46 +0000 (18:54 +0200)]
bump version for a release soon
Hiltjo Posthuma [Wed, 2 Aug 2017 16:45:04 +0000 (18:45 +0200)]
example_create.sh: make executable
Hiltjo Posthuma [Sun, 30 Jul 2017 15:21:42 +0000 (17:21 +0200)]
improve example scripts, add to build (Makefile)
Hiltjo Posthuma [Sat, 15 Jul 2017 11:50:24 +0000 (13:50 +0200)]
improve example, add initial post-receive example
Hiltjo Posthuma [Thu, 6 Jul 2017 11:20:41 +0000 (13:20 +0200)]
README: add example for a git hook and to set the url file
Hiltjo Posthuma [Wed, 5 Jul 2017 18:25:54 +0000 (20:25 +0200)]
README: add example to create tar.gz archives by tag
Hiltjo Posthuma [Sun, 25 Jun 2017 10:28:59 +0000 (12:28 +0200)]
Makefile: remove TODO
fixes make dist, thanks stateless :)
Hiltjo Posthuma [Fri, 23 Jun 2017 12:03:14 +0000 (14:03 +0200)]
remove TODO
Hiltjo Posthuma [Fri, 23 Jun 2017 11:53:46 +0000 (13:53 +0200)]
separate getstats from getbyoid: slightly faster
Hiltjo Posthuma [Sun, 7 May 2017 11:12:43 +0000 (13:12 +0200)]
for the commit Date: header use the git format-patch format
Hiltjo Posthuma [Sun, 7 May 2017 10:02:48 +0000 (12:02 +0200)]
dont truncate summary length anymore
make sure not partial (invalid) utf-8 sequences are written. The old logic
truncated by bytelen was wrong. It is too complex to implement it in a
correct way with git: it is not assured a commit message is UTF-8 encoded.
remove showlinecount and summarylen variables.
Hiltjo Posthuma [Thu, 4 May 2017 22:23:50 +0000 (00:23 +0200)]
remove config.def.h: it was not used anymore
thanks tarug0 for reporting it!
Hiltjo Posthuma [Sat, 22 Apr 2017 17:07:07 +0000 (19:07 +0200)]
improve commitinfo_getstats
- reorder: unnecessary allocation when git_patch_from_diff fails.
- no need to free patch object when git_patch_from_diff fails.
Hiltjo Posthuma [Sat, 22 Apr 2017 12:38:39 +0000 (14:38 +0200)]
improve documentation
- add example to README to extract gitweb.owner from a git config.
this is used in gitweb and some cgit configurations.
- fix (new) mandoc warnings (new sentence on each line).
- improve some texts in the man pages, sort / structure some list items.
Hiltjo Posthuma [Mon, 17 Apr 2017 14:39:03 +0000 (16:39 +0200)]
align line numbers to 8 spaces
... now it is done.
Hiltjo Posthuma [Mon, 17 Apr 2017 14:16:33 +0000 (16:16 +0200)]
writeblobhtml: minor style fix
using len instead of the loop 'i' is slightly more clear
Hiltjo Posthuma [Mon, 17 Apr 2017 11:39:05 +0000 (13:39 +0200)]
stagit: fix rendering of first TAB in file
else TABs wont render properly (interpreted as part of HTML whitespace)
at the first TAB of the line.
Hiltjo Posthuma [Mon, 17 Apr 2017 11:13:26 +0000 (13:13 +0200)]
stagit-index: also dont assume someones <html lang> :)
Hiltjo Posthuma [Mon, 17 Apr 2017 11:06:02 +0000 (13:06 +0200)]
stagit-index: remove Content-Language: en
forgot to remove this from stagit-index aswell, see also:
commit
9e96062b620088a42c7b345e07cc8c12e2b59ed2
Hiltjo Posthuma [Sun, 16 Apr 2017 18:59:23 +0000 (20:59 +0200)]
writeblobhtml: fix possible uninitialized variable n when len == 0
... whoops
Hiltjo Posthuma [Sun, 16 Apr 2017 18:37:42 +0000 (20:37 +0200)]
writeblobhtml: improve file view for text-browsers
browsers such as lynx and w3m have some quirks displaying tables and pre
elements.
links is a bit better with this.
Hiltjo Posthuma [Sun, 16 Apr 2017 18:36:48 +0000 (20:36 +0200)]
stagit-index: remove empty h1 and add bold markup to table headers
Hiltjo Posthuma [Sun, 16 Apr 2017 18:36:17 +0000 (20:36 +0200)]
text-browser improvements
for links, lynx, w3m, dil[dl]o etc:
- set oldschool align attribute.
- apply bold markup to table header.
Hiltjo Posthuma [Sun, 16 Apr 2017 18:32:34 +0000 (20:32 +0200)]
README: advertise text-browser improvements