Commit graph

343 commits

Author SHA1 Message Date
Hiltjo Posthuma
57f84d0fd1 bump version to 0.9.6 2021-05-27 12:41:43 +02:00
Hiltjo Posthuma
45394004a3 man page: codemadness is the primary server. make logo brandless (not 2f30) 2021-05-18 11:42:41 +02:00
Quentin Rameau
ddc581bd90 README: improve a bit the usage examples 2021-05-18 10:42:21 +02:00
Hiltjo Posthuma
c827ab1b1d 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!
2021-05-05 19:15:58 +02:00
Hiltjo Posthuma
727e02be6c tiny comment change 2021-03-25 18:17:34 +01:00
Hiltjo Posthuma
295e4b8cb9 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".
2021-03-25 18:13:13 +01:00
Hiltjo Posthuma
995f7d5c5d add meta viewport on stagit-index too
Patch by Oscar Benedito, thanks!
2021-03-19 11:29:53 +01:00
Hiltjo Posthuma
f464058501 bump version to 0.9.5 2021-03-14 16:23:58 +01:00
Hiltjo Posthuma
c4d5fecc40 LICENSE: update 2021-03-05 12:47:08 +01:00
Hiltjo Posthuma
5ced189f19 change STAGIT_BASEURL to an -u option and also update the example script 2021-03-05 12:44:48 +01:00
Hiltjo Posthuma
7968c0bc9c add $STAGIT_BASEURL environment variable to make Atom links absolute
With feedback from adc, thanks!
2021-03-05 11:51:21 +01:00
Hiltjo Posthuma
d1c528fb5a README: mention tags.xml feature 2021-03-05 11:50:16 +01:00
Hiltjo Posthuma
722f836460 micro-optimization: fputc (function) -> putc (macro/inline function) 2021-01-09 14:59:53 +01:00
Hiltjo Posthuma
5044ddeea3 LICENSE: bump year 2021-01-08 14:32:33 +01:00
Hiltjo Posthuma
e1c0aebde4 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!
2020-11-28 12:28:05 +01:00
Oscar Benedito
66df204c44 add abbreviated commit hash to submodule file 2020-11-23 17:15:30 +01:00
Hiltjo Posthuma
a63645a5ea add meta viewport for scaling on mobile
Patch by Augustin Fabre <augustin@augfab.fr>
2020-11-15 21:16:24 +01:00
Hiltjo Posthuma
ae41add24a style.css: improve contrast
https://webaim.org/resources/contrastchecker/?fcolor=555555&bcolor=FFFFFF

Patch by Augustin Fabre <augustin@augfab.fr> and adapted.
2020-11-15 21:16:06 +01:00
Hiltjo Posthuma
fc5ef41165 use size_t to count lines 2020-11-15 21:01:50 +01:00
Hiltjo Posthuma
4f60446c01 avoid shadowed `name' global variable
by Augustin Fabre <augustin@augfab.fr>
2020-11-15 20:58:58 +01:00
Hiltjo Posthuma
9467f347a2 refs_cmp: remove unneeded cast 2020-11-15 20:58:41 +01:00
Hiltjo Posthuma
3e7865f8f9 use LEN() macros for arrays
from Augustin Fabre <augustin@augfab.fr>
2020-11-15 20:58:02 +01:00
Hiltjo Posthuma
75555cd99e bump version to 0.9.4 2020-08-17 16:09:33 +02:00
Hiltjo Posthuma
5334f3e000 fix a small memleak in writeatom()
non-tag references were not freed.
2020-08-10 16:09:46 +02:00
Hiltjo Posthuma
dc0709f6f4 stagit-index: remove unveil support for argv
This can reach the unveil argument limits and it is not a good case for using
unveil.
2020-08-08 20:01:05 +02:00
kst
174a763058 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
2020-08-06 18:25:27 +02:00
Hiltjo Posthuma
f05e6b0fcb regression: do not show unset or empty tags 2020-07-20 14:15:12 +02:00
Hiltjo Posthuma
d80a163acd refactor get reference, add another feed for tags/releases
A separate Atom feed is helpful to ports maintainers to monitor new
tags/releases.
2020-07-19 16:41:10 +02:00
Hiltjo Posthuma
693c064489 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!
2020-07-19 14:07:54 +02:00
Hiltjo Posthuma
467dfeb8f4 bump version to 0.9.3 2020-02-23 20:30:46 +01:00
Hiltjo Posthuma
bbeffc281d atom.xml: improve output format a bit 2020-02-21 13:46:23 +01:00
Hiltjo Posthuma
2f7e7f2503 improve includes, stagit-index does not need compat.h 2020-02-12 23:20:25 +01:00
Hiltjo Posthuma
4a93974f52 style.css: highlight anchor ids, useful for linking highlighting lines in a diff 2019-12-29 19:02:04 +01:00
Hiltjo Posthuma
31c0f00651 small code-style white-space/newline 2019-12-22 12:53:54 +01:00
Hiltjo Posthuma
edee68f398 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.
2019-12-01 18:31:07 +01:00
Hiltjo Posthuma
b5607f75af some README tweaks and rewording, reordering 2019-12-01 18:26:27 +01:00
Hiltjo Posthuma
adaff713dc 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.
2019-12-01 18:26:04 +01:00
Leonardo Taccari
d6937c195f README: works also on NetBSD 2019-05-05 19:28:19 +02:00
Hiltjo Posthuma
c783e54dae bump version to 0.9.2 2019-04-23 20:53:05 +02:00
Hiltjo Posthuma
028c7526ba escape HTML in paths
- escape paths in diff line.
- escape path in anchor href attribute in files.html
2019-03-16 13:07:58 +01:00
Hiltjo Posthuma
bb1d06eb20 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."
2019-03-09 12:39:10 +01:00
Hiltjo Posthuma
587b01428d 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.
2019-03-01 11:49:29 +01:00
Hiltjo Posthuma
477d50169a bump version to 0.9.1 2019-02-22 11:13:44 +01:00
Hiltjo Posthuma
9224d31cf6 Makefile: add DOCPREFIX for installing docs in ports
change installed doc from /usr/local/share/stagit to /usr/local/share/doc/stagit
2019-02-16 21:17:45 +01:00
Hiltjo Posthuma
3fbef5c9b0 change order of commits in log from most recent to old to applied order 2019-02-16 21:17:45 +01:00
Hiltjo Posthuma
583c44395c fix compile: libgit2 0.28 changed giterr_last to git_error_last
libgit2 commit:
a27a4de6f8
2019-02-16 21:17:38 +01:00
Hiltjo Posthuma
9ad1cb6e42 bump version to 0.9 2018-12-25 13:44:02 +01:00
Hiltjo Posthuma
1df3f334f6 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.
2018-12-25 13:39:34 +01:00
Hiltjo Posthuma
3a151527e1 in the diffstat prefix the type of change, allow CSS styling 2018-11-18 18:08:20 +01:00
Hiltjo Posthuma
608593b0f8 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.
2018-11-18 18:07:22 +01:00