forks/stagit.git
3 years agosmall typo fixes and url -> URL
Hiltjo Posthuma [Fri, 30 Jul 2021 23:09:45 +0000 (01:09 +0200)]
small typo fixes and url -> URL

3 years agobump version to 0.9.6
Hiltjo Posthuma [Thu, 27 May 2021 10:41:43 +0000 (12:41 +0200)]
bump version to 0.9.6

3 years agoman page: codemadness is the primary server. make logo brandless (not 2f30)
Hiltjo Posthuma [Tue, 18 May 2021 09:42:41 +0000 (11:42 +0200)]
man page: codemadness is the primary server. make logo brandless (not 2f30)

3 years agoREADME: improve a bit the usage examples
Quentin Rameau [Tue, 18 May 2021 08:38:54 +0000 (10:38 +0200)]
README: improve a bit the usage examples

3 years agodo not simplify the history by first-parent
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!

3 years agotiny comment change
Hiltjo Posthuma [Thu, 25 Mar 2021 17:17:34 +0000 (18:17 +0100)]
tiny comment change

3 years agoadd function to print a single line, ignoring \r and \n
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".

3 years agoadd meta viewport on stagit-index too
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!

3 years agobump version to 0.9.5
Hiltjo Posthuma [Sun, 14 Mar 2021 15:23:58 +0000 (16:23 +0100)]
bump version to 0.9.5

3 years agoLICENSE: update
Hiltjo Posthuma [Fri, 5 Mar 2021 11:47:08 +0000 (12:47 +0100)]
LICENSE: update

3 years agochange STAGIT_BASEURL to an -u option and also update the example script
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

3 years agoadd $STAGIT_BASEURL environment variable to make Atom links absolute
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!

3 years agoREADME: mention tags.xml feature
Hiltjo Posthuma [Fri, 5 Mar 2021 10:50:16 +0000 (11:50 +0100)]
README: mention tags.xml feature

3 years agomicro-optimization: fputc (function) -> putc (macro/inline function)
Hiltjo Posthuma [Sat, 9 Jan 2021 13:59:53 +0000 (14:59 +0100)]
micro-optimization: fputc (function) -> putc (macro/inline function)

3 years agoLICENSE: bump year
Hiltjo Posthuma [Fri, 8 Jan 2021 13:32:33 +0000 (14:32 +0100)]
LICENSE: bump year

3 years agofix warning with libgit2 v0.99+, remain compatible with older versions
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!

3 years agoadd abbreviated commit hash to submodule file
Oscar Benedito [Mon, 16 Nov 2020 22:24:32 +0000 (23:24 +0100)]
add abbreviated commit hash to submodule file

3 years agoadd meta viewport for scaling on mobile
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>

3 years agostyle.css: improve contrast
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.

3 years agouse size_t to count lines
Hiltjo Posthuma [Sun, 15 Nov 2020 19:59:34 +0000 (20:59 +0100)]
use size_t to count lines

3 years agoavoid shadowed `name' global variable
Hiltjo Posthuma [Sun, 15 Nov 2020 19:58:58 +0000 (20:58 +0100)]
avoid shadowed `name' global variable

by Augustin Fabre <augustin@augfab.fr>

3 years agorefs_cmp: remove unneeded cast
Hiltjo Posthuma [Sun, 15 Nov 2020 19:58:41 +0000 (20:58 +0100)]
refs_cmp: remove unneeded cast

3 years agouse LEN() macros for arrays
Hiltjo Posthuma [Sun, 15 Nov 2020 19:58:02 +0000 (20:58 +0100)]
use LEN() macros for arrays

from Augustin Fabre <augustin@augfab.fr>

4 years agobump version to 0.9.4
Hiltjo Posthuma [Mon, 17 Aug 2020 14:09:33 +0000 (16:09 +0200)]
bump version to 0.9.4

4 years agofix a small memleak in writeatom()
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.

4 years agostagit-index: remove unveil support for argv
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.

4 years agofix submodule lookup in bare repos
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

4 years agoregression: do not show unset or empty tags
Hiltjo Posthuma [Mon, 20 Jul 2020 12:15:12 +0000 (14:15 +0200)]
regression: do not show unset or empty tags

4 years agorefactor get reference, add another feed for tags/releases
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.

4 years agosort branches and tags by time (descending)
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!

4 years agobump version to 0.9.3
Hiltjo Posthuma [Sun, 23 Feb 2020 19:30:46 +0000 (20:30 +0100)]
bump version to 0.9.3

4 years agoatom.xml: improve output format a bit
Hiltjo Posthuma [Fri, 21 Feb 2020 12:46:23 +0000 (13:46 +0100)]
atom.xml: improve output format a bit

4 years agoimprove includes, stagit-index does not need compat.h
Hiltjo Posthuma [Wed, 12 Feb 2020 22:20:25 +0000 (23:20 +0100)]
improve includes, stagit-index does not need compat.h

4 years agostyle.css: highlight anchor ids, useful for linking highlighting lines in a diff
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

4 years agosmall code-style white-space/newline
Hiltjo Posthuma [Sun, 22 Dec 2019 11:53:54 +0000 (12:53 +0100)]
small code-style white-space/newline

4 years agoadd OpenBSD unveil support
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.

4 years agosome README tweaks and rewording, reordering
Hiltjo Posthuma [Sun, 1 Dec 2019 17:26:27 +0000 (18:26 +0100)]
some README tweaks and rewording, reordering

4 years agoMakefile improvements
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.

5 years agoREADME: works also on NetBSD
Leonardo Taccari [Sun, 5 May 2019 17:11:36 +0000 (19:11 +0200)]
README: works also on NetBSD

5 years agobump version to 0.9.2
Hiltjo Posthuma [Tue, 23 Apr 2019 18:53:05 +0000 (20:53 +0200)]
bump version to 0.9.2

5 years agoescape HTML in paths
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

5 years agopedantic snprintf() improvement
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."

5 years agofix issues in example scripts
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.

5 years agobump version to 0.9.1
Hiltjo Posthuma [Fri, 22 Feb 2019 10:13:44 +0000 (11:13 +0100)]
bump version to 0.9.1

5 years agoMakefile: add DOCPREFIX for installing docs in ports
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

5 years agochange order of commits in log from most recent to old to applied order
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

5 years agofix compile: libgit2 0.28 changed giterr_last to git_error_last
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

5 years agobump version to 0.9
Hiltjo Posthuma [Tue, 25 Dec 2018 12:44:02 +0000 (13:44 +0100)]
bump version to 0.9

5 years agostyle: keep default browser style for links, except patch chunks
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.

5 years agoin the diffstat prefix the type of change, allow CSS styling
Hiltjo Posthuma [Sun, 18 Nov 2018 17:08:20 +0000 (18:08 +0100)]
in the diffstat prefix the type of change, allow CSS styling

5 years agodon't use a heuristic for renames, the content must match exactly
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.

5 years agodetect filetype changes in diff (for example a normal file to symlink)
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)

5 years agodetect more names for README and LICENSE
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.

5 years agodetect copies and renames based on the threshold of changes
Hiltjo Posthuma [Sun, 11 Nov 2018 17:09:27 +0000 (18:09 +0100)]
detect copies and renames based on the threshold of changes

6 years agosimplify range check
Hiltjo Posthuma [Sun, 19 Aug 2018 20:03:45 +0000 (22:03 +0200)]
simplify range check

6 years agostagit: log: indicate when using the -l option and there are more commits
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

6 years agoassume OpenBSD 5.9+, always try pledge(2) on OpenBSD
Hiltjo Posthuma [Fri, 25 May 2018 16:43:36 +0000 (18:43 +0200)]
assume OpenBSD 5.9+, always try pledge(2) on OpenBSD

6 years agoClarify usage regarding -c and -l mutual exclusion
Quentin Rameau [Wed, 9 May 2018 16:51:08 +0000 (18:51 +0200)]
Clarify usage regarding -c and -l mutual exclusion

6 years agobump version to 0.8
Hiltjo Posthuma [Sat, 7 Apr 2018 12:14:35 +0000 (14:14 +0200)]
bump version to 0.8

6 years agostagit-index: pledge after git_libgit2_init
Hiltjo Posthuma [Fri, 6 Apr 2018 17:28:05 +0000 (19:28 +0200)]
stagit-index: pledge after git_libgit2_init

6 years agopledge 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.

6 years agooptimization: only diff the tree when it is needed for the diffstat...
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.

6 years agoREADME: improve tarball generation by tag example
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.

6 years agostagit: add -l option: limit the amount of commits for the log.html file
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

6 years agobump LICENSE to 2018
Hiltjo Posthuma [Sun, 21 Jan 2018 14:23:21 +0000 (15:23 +0100)]
bump LICENSE to 2018

6 years agostyle.css: improve compatibility with older browsers, namely dillo
Hiltjo Posthuma [Sat, 20 Jan 2018 12:18:27 +0000 (13:18 +0100)]
style.css: improve compatibility with older browsers, namely dillo

6 years agoRemove a non-portable syntax in Makefile
Quentin Rameau [Sat, 2 Dec 2017 18:04:22 +0000 (19:04 +0100)]
Remove a non-portable syntax in Makefile

6 years agoMakefile: bump version to 0.7.2
Hiltjo Posthuma [Sat, 25 Nov 2017 15:06:26 +0000 (16:06 +0100)]
Makefile: bump version to 0.7.2

6 years agopost-receive: fix warning in script for example when pushing deleted tags
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.

6 years agoSort style.css in alphabetical order
Aaron Marcher [Sat, 25 Nov 2017 11:09:56 +0000 (12:09 +0100)]
Sort style.css in alphabetical order

6 years agoMakefile: bump version to 0.7.1
Hiltjo Posthuma [Sun, 19 Nov 2017 13:58:15 +0000 (14:58 +0100)]
Makefile: bump version to 0.7.1

6 years agofix: add "fattr" pledge for chmod(2) for cachefile
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)

6 years agoMakefile: bump version to 0.7
Hiltjo Posthuma [Sat, 18 Nov 2017 11:53:08 +0000 (12:53 +0100)]
Makefile: bump version to 0.7

6 years agoMakefile: remove unused $SCRIPTS
Hiltjo Posthuma [Sat, 11 Nov 2017 00:34:50 +0000 (01:34 +0100)]
Makefile: remove unused $SCRIPTS

6 years agofix file permissions for cachefile and respect umask(2)
Hiltjo Posthuma [Fri, 10 Nov 2017 19:55:20 +0000 (20:55 +0100)]
fix file permissions for cachefile and respect umask(2)

6 years agomore verbose errors: show which file failed on open
Hiltjo Posthuma [Fri, 10 Nov 2017 19:53:46 +0000 (20:53 +0100)]
more verbose errors: show which file failed on open

6 years agoREADME: clarify some cons
Hiltjo Posthuma [Tue, 31 Oct 2017 22:25:35 +0000 (23:25 +0100)]
README: clarify some cons

6 years agopost-receive hook: force UTF-8 locale
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.

7 years agoallow umask to handle permissions
Hiltjo Posthuma [Mon, 4 Sep 2017 16:14:52 +0000 (18:14 +0200)]
allow umask to handle permissions

7 years agoignore object 0000000000000000000000000000000000000000
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.

7 years agobump version for a release soon
Hiltjo Posthuma [Wed, 2 Aug 2017 16:54:46 +0000 (18:54 +0200)]
bump version for a release soon

7 years agoexample_create.sh: make executable
Hiltjo Posthuma [Wed, 2 Aug 2017 16:45:04 +0000 (18:45 +0200)]
example_create.sh: make executable

7 years agoimprove example scripts, add to build (Makefile)
Hiltjo Posthuma [Sun, 30 Jul 2017 15:21:42 +0000 (17:21 +0200)]
improve example scripts, add to build (Makefile)

7 years agoimprove example, add initial post-receive example
Hiltjo Posthuma [Sat, 15 Jul 2017 11:50:24 +0000 (13:50 +0200)]
improve example, add initial post-receive example

7 years agoREADME: add example for a git hook and to set the url file
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

7 years agoREADME: add example to create tar.gz archives by tag
Hiltjo Posthuma [Wed, 5 Jul 2017 18:25:54 +0000 (20:25 +0200)]
README: add example to create tar.gz archives by tag

7 years agoMakefile: remove TODO
Hiltjo Posthuma [Sun, 25 Jun 2017 10:28:59 +0000 (12:28 +0200)]
Makefile: remove TODO

fixes make dist, thanks stateless :)

7 years agoremove TODO
Hiltjo Posthuma [Fri, 23 Jun 2017 12:03:14 +0000 (14:03 +0200)]
remove TODO

7 years agoseparate getstats from getbyoid: slightly faster
Hiltjo Posthuma [Fri, 23 Jun 2017 11:53:46 +0000 (13:53 +0200)]
separate getstats from getbyoid: slightly faster

7 years agofor the commit Date: header use the git format-patch format
Hiltjo Posthuma [Sun, 7 May 2017 11:12:43 +0000 (13:12 +0200)]
for the commit Date: header use the git format-patch format

7 years agodont truncate summary length anymore
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.

7 years agoremove config.def.h: it was not used anymore
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!

7 years agoimprove commitinfo_getstats
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.

7 years agoimprove documentation
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.

7 years agoalign line numbers to 8 spaces
Hiltjo Posthuma [Mon, 17 Apr 2017 14:39:03 +0000 (16:39 +0200)]
align line numbers to 8 spaces

... now it is done.

7 years agowriteblobhtml: minor style fix
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

7 years agostagit: fix rendering of first TAB in file
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.

7 years agostagit-index: also dont assume someones <html lang> :)
Hiltjo Posthuma [Mon, 17 Apr 2017 11:13:26 +0000 (13:13 +0200)]
stagit-index: also dont assume someones <html lang> :)

7 years agostagit-index: remove Content-Language: en
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

7 years agowriteblobhtml: fix possible uninitialized variable n when len == 0
Hiltjo Posthuma [Sun, 16 Apr 2017 18:59:23 +0000 (20:59 +0200)]
writeblobhtml: fix possible uninitialized variable n when len == 0

... whoops