Commit graph

278 commits

Author SHA1 Message Date
Hiltjo Posthuma
82aefe6305 bump version to 0.5 2017-01-05 18:47:26 +01:00
Hiltjo Posthuma
92cee02f12 also remove language and text direction attribute from <html> 2016-11-09 18:28:46 +01:00
Hiltjo Posthuma
9e96062b62 remove Content-Language: en
thanks Aymeric Mansoux!
2016-11-09 17:49:38 +01:00
Hiltjo Posthuma
300a2495c6 stagit.1: also document linking to git submodules: .gitmodules file 2016-10-14 12:12:35 +02:00
Hiltjo Posthuma
7844a95088 stagit.1: clarify README and LICENSE link creation
thanks Solene Rapenne for the patch! (slightly modified)
2016-10-13 18:10:52 +02:00
Hiltjo Posthuma
de7f5fc76d simplify example.sh, thanks emg for the suggestion! 2016-09-15 20:44:47 +02:00
Hiltjo Posthuma
e19351cdb8 update LICENSE 2016-07-20 18:15:18 +02:00
Hiltjo Posthuma
12069466ff config.mk: remove -lc
Thanks quinq!

POSIX/quinq says:

"In the absence of options that inhibit invocation of the link editor, such as
-c or -E, the c99 utility shall cause the equivalent of a -l c option to be
passed to the link editor after the last pathname operand or -l option, causing
it to be searched after all other object files and libraries are loaded."
2016-07-02 12:44:34 +02:00
Hiltjo Posthuma
30116a4ef2 treat an empty repo (without a HEAD) as valid
and create the standard files. Disable caching if there is no HEAD.
2016-05-29 15:04:52 +02:00
Hiltjo Posthuma
44a49f51db improve example: strip .git suffix
stagit-index and stagit strip the .git suffix so also strip it from the
directory for the possible www root.

Thanks to ng0 for reporting it!
2016-05-29 13:06:32 +02:00
Hiltjo Posthuma
837427b09e refs_cmp: simplify check, functionally the same 2016-05-21 18:37:53 +02:00
Hiltjo Posthuma
df3ea10eca check if LICENSE, README and .gitmodules is a file blob
don't link to directory trees, etc. Thanks 600360 for reporting it!
2016-05-08 20:37:37 +02:00
Hiltjo Posthuma
518556d7b0 release 0.4 2016-05-07 15:03:40 +02:00
Hiltjo Posthuma
972617ee0b update TODO 2016-05-07 14:43:35 +02:00
Hiltjo Posthuma
a7dd578de7 simplify, id is unused 2016-05-07 14:38:39 +02:00
Hiltjo Posthuma
f89c317dee simplify, no need for goto 2016-05-07 14:34:51 +02:00
Hiltjo Posthuma
f8e30cf2a0 improve stagit.1 documentation, reword and explain caching behaviour 2016-05-07 14:34:51 +02:00
Hiltjo Posthuma
2f8595e786 consistency for messages for special-case in diffstat 2016-05-07 14:34:45 +02:00
Hiltjo Posthuma
f63edd593d fix error in "code cleanup" commit 9328d2690e
... the loop was simplified, but forgot to remove p++ (double used) while
rebasing the change.
2016-05-07 13:52:42 +02:00
Hiltjo Posthuma
6e5e218b69 fix and simplify time offset 2016-05-06 12:01:57 +02:00
Hiltjo Posthuma
c6e8f9fd80 make diffstat files an anchor (jump to delta) 2016-05-06 11:49:25 +02:00
Hiltjo Posthuma
543582034e fix joinpath(): use of global 'repodir', should be 'path'
use joinpath for another case.
2016-05-03 20:42:46 +02:00
Hiltjo Posthuma
2d8eb85f01 fix regression from last commit 2016-05-03 20:28:09 +02:00
Hiltjo Posthuma
9328d2690e code cleanup 2016-05-03 20:18:37 +02:00
Hiltjo Posthuma
069f105725 remove config.h, add options to stagit.c 2016-05-03 00:38:33 +02:00
Hiltjo Posthuma
aa36e0c9b4 add OpenBSD pledge(2) support using -DUSE_PLEDGE 2016-05-03 00:33:56 +02:00
Hiltjo Posthuma
eae9437f94 example.sh: use cache file 2016-05-02 21:48:47 +02:00
Hiltjo Posthuma
f5301b25e1 style: write atom feed end in one write, kills 2 lines 2016-05-02 21:25:44 +02:00
Hiltjo Posthuma
1a3584e2d0 cache support (-c option)
"Optionally the -c cachefile option can be used to cache the entries of
the log page up to the point of the last commit. The cachefile will store
the last commit id and the entries in the HTML table."

this caches the diffstat and commits, it is an expensive operation (twss).
2016-05-02 21:17:52 +02:00
Hiltjo Posthuma
ede93fa7ee small code cleanup: no need for status variable 2016-05-01 19:09:26 +02:00
Hiltjo Posthuma
45ee6876d5 atom feed: use published for author commit date, updated for committer date
this is the same as cgit.
2016-05-01 17:20:54 +02:00
Hiltjo Posthuma
462ba66ee7 fix times (and timezone)
- in the index and log show the short time (GMT).
- in the Atom feed use GMT time.
- for commits show the time + offset.
2016-05-01 16:56:58 +02:00
Hiltjo Posthuma
7a1da0b985 README: minor update 2016-05-01 14:51:11 +02:00
Hiltjo Posthuma
fc60d78d89 fix path join '/'
add joinpath() function to handle this.
2016-05-01 14:51:02 +02:00
Hiltjo Posthuma
c13c411950 code cleanup + style, functionally equivalent 2016-05-01 14:42:20 +02:00
Hiltjo Posthuma
254f215e50 layout: right align lines changed count in diffstat 2016-04-30 13:08:44 +02:00
Hiltjo Posthuma
7067223104 optimization: suppress large diffs
the values are arbitrary, these can be tweaked later if needed.
2016-04-30 12:47:06 +02:00
Hiltjo Posthuma
914880f31b optimization: read stats once and remember it
for an initial run and new commits this speeds stagit up a bit:
on an initial run of sbase goes from about 4 seconds to 2.8 on my machine.

now we can't use statsbuf, so create the stats string ourselves, while at it
color the + and - using a style (can be disabled for the color-haters out
there ;)).
2016-04-30 12:47:00 +02:00
Hiltjo Posthuma
0bc47da0f7 example.sh: fix: sort list (regression from simplifying the script) 2016-04-29 21:52:29 +02:00
Hiltjo Posthuma
ad40433839 whoops, module is m--------- 2016-04-29 21:24:58 +02:00
Hiltjo Posthuma
5c278a600e submodule support
- detect .gitmodules file for submodules, add a link "submodules" to the top menu.
- link each submodule to the .gitmodules file in HEAD.
- revert the special style for modules, but list it as a file "m---------", don't show
  the line/filesize though, it is not a file.
2016-04-29 21:14:46 +02:00
Hiltjo Posthuma
671f4e9100 suppress meaningless error codes when a repo can't be opened (similar to stagit-index) 2016-04-29 16:39:33 +02:00
Hiltjo Posthuma
bc7515e2dc improve example, remove sort hack 2016-04-29 16:38:48 +02:00
Hiltjo Posthuma
a524ca1b3d make submodule link black, easier to read
this is also the same color as a bare repo without a link.
2016-04-29 15:57:55 +02:00
Hiltjo Posthuma
f2773b0319 minor style fix 2016-04-29 15:55:33 +02:00
Quentin Rameau
b8af751b01 Fix null pointer access for submodules in writefilestree
Do not try to set a link to submodules from bare repo as we can't get
the actual url.
2016-04-29 15:54:57 +02:00
Hiltjo Posthuma
375d41dcce tweak style of showing submodules
this will make it look similar to cgit. show mode as "m---------"
2016-04-29 12:32:36 +02:00
z3bra
571076b419 Don't fail on submodules
Submodules will get listed prefixed with a '@', using a specific CSS class for
styling. The href will be set to the url of the submodule.
Filesize will appear as 0 and filemode will not be printed to avoid an awkward
mode: "?---------".

In writefilestree, we don't return anymore if an entry can't be categorized as
an object, but rather, fail if we can't retrieve its name.
2016-04-29 12:31:39 +02:00
Hiltjo Posthuma
28730218c4 fix: check gmtime, can return NULL on error 2016-04-27 19:24:15 +02:00
Hiltjo Posthuma
8df54926f2 resolve absolute paths to repodir, remove basename just use strrchr.
- 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.
2016-04-27 19:19:50 +02:00