Commit Graph
100 Commits
Author SHA1 Message Date
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
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
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
Hiltjo Posthuma 70b777831a stagit-index: remove unused efopen function 2016-04-27 16:40:51 +02:00
Hiltjo Posthuma 86bbe82211 fix: link to line in hunk if a patch has multiple files and hunks
thanks to lostd for reporting it!
2016-04-27 16:39:48 +02:00
Hiltjo Posthuma 0328079589 Makefile: use NAME variable, suggested by Quentin 2016-03-20 17:29:31 +01:00
Hiltjo Posthuma cd6a519813 Makefile: separate CPPFLAGS, compile optimized build by default 2016-03-20 16:23:33 +01:00
Hiltjo Posthuma 761417d254 improve make dist, thanks Quentin Rameau
based on a patch from Quentin with some additions.

- don't build before make dist
- package in directory: stagit-VERSION.
2016-03-20 15:36:21 +01:00
Hiltjo Posthuma 41c90a9173 premature version bumperation, 0.4 (unreleased) 2016-03-20 14:19:48 +01:00
Hiltjo Posthuma c379d65770 add titles to pages, summary for commit messages, filename for files 2016-03-01 19:14:00 +01:00
Hiltjo Posthuma 78c29a1de2 fix right-alignment of "Files" column 2016-02-26 19:59:11 +01:00
Hiltjo Posthuma ad22404903 check path truncation
be strict about it
2016-02-24 14:47:20 +01:00
Hiltjo Posthuma f4f53c577e config.mk: add -D_DEFAULT_SOURCE to commented builds 2016-02-24 14:41:37 +01:00
Hiltjo Posthuma 8bf328befa atom feed: add link, move content order to bottom
NOTE: using relative links violates the Atom specification, but relative
links are convenient aswell.
2016-02-23 20:44:00 +01:00
Hiltjo Posthuma 5578784dda make printshowfile more generic and like other functions 2016-02-23 20:37:17 +01:00
Hiltjo Posthuma ce535ae1af just use Name as first column, thanks quinq for the suggestion 2016-01-21 20:42:11 +01:00
Hiltjo Posthuma 2296f5167c example.sh: fix: remove error mode, would stop if a dir was invalid
mkdir -p makes the directory always, so no need to check.
2016-01-08 22:17:54 +01:00
Hiltjo Posthuma 8983c802c1 example.sh: fix go to appropriate dir 2016-01-08 21:27:22 +01:00
Hiltjo Posthuma 934980659a implify and restructure code
- remove commit message and lines changed from refs page.
- resolve HEAD once.
- dont make filepath in writeblob()
2016-01-08 20:08:40 +01:00
Hiltjo Posthuma efe16db1e5 stagit-index: clarify order of the list 2016-01-08 13:44:22 +01:00
Hiltjo Posthuma fd66a29d3a example.sh: add index-time.html, list sorted by time, fix reposdir '/' 2016-01-08 13:44:22 +01:00
Hiltjo Posthuma 9a78132882 premature version bumperation (0.3) for git 2016-01-08 10:24:50 +01:00
Hiltjo Posthuma 3cc1509656 atom: add newline after date and before message 2016-01-07 17:37:25 +01:00
Hiltjo Posthuma 12a96d466d update man pages: document stripping of .git suffix 2016-01-06 20:06:06 +01:00
Hiltjo Posthuma ede4982f67 strip .git suffix from name
also free stripped_name in the case of stagit-index
2016-01-06 20:06:06 +01:00
Hiltjo Posthuma db02820a17 extra whitespace 2016-01-06 20:06:06 +01:00
Hiltjo Posthuma c576a7ae6e style: vertical-align header text 2016-01-06 19:19:20 +01:00
Hiltjo Posthuma 3aa8ac2a1e update TODO 2016-01-06 19:14:59 +01:00
Hiltjo Posthuma 9978fecb18 refs: only make commit link work for tags 2016-01-06 19:13:51 +01:00
Hiltjo Posthuma 512a31e81f free obj 2016-01-06 19:11:11 +01:00
Hiltjo Posthuma e45eac89b8 LICENSE: whoops its already 2016 2016-01-06 18:58:20 +01:00
Hiltjo Posthuma 94eba1c052 LICENSE: add dimitris to license/shareholder file 2016-01-06 18:55:25 +01:00
Hiltjo Posthuma 650d6c903c old leftover: dont create log dir 2016-01-06 18:53:51 +01:00
Hiltjo Posthuma aa3b813f14 cleanup code a bit 2016-01-06 18:53:51 +01:00
Hiltjo Posthuma 6a427c75fc style.css: wrap description text, nowrap for rest
vertical align to the top of the cell, this makes it scale better to some smaller screens
2016-01-06 18:53:51 +01:00
Hiltjo Posthuma 87360fe252 use git_reference for tags and branches, sort branches also
this removes some lines and somewhat simplifies it
2016-01-06 17:45:02 +01:00
Hiltjo Posthuma c750958b95 fix cast to uintmax_t 2016-01-06 16:04:37 +01:00
Hiltjo Posthuma d045340ea0 lookup commits of annotated tags
NOTE: as described in the TODO this will be rewritten more cleanly
      later using git_reference_*.
2016-01-06 15:35:34 +01:00
Hiltjo Posthuma 9128782aa8 fix warning, use intmax_t %ju, thanks stateless! 2016-01-06 15:19:26 +01:00
Hiltjo Posthuma 824526a656 premature version bumperation 2016-01-06 11:56:52 +01:00
Hiltjo Posthuma e2b6fa11fc improve README 2016-01-06 11:56:43 +01:00
Hiltjo Posthuma e451b0bf1d improve Makefile
dist: add favicon.png, config.def.h and example.sh
install: install favicon.png and example.sh
2016-01-06 11:24:29 +01:00
Hiltjo Posthuma 6f7d23c5ea tiny whitespace fix 2016-01-05 22:32:11 +01:00
Hiltjo Posthuma a8943ce1f8 stagit-index: continue making list, but return error code 2016-01-05 22:30:59 +01:00
Hiltjo Posthuma 35a3d9b3fc fix relpath for log 2016-01-05 21:43:26 +01:00
Hiltjo Posthuma f373cc7235 clone url is one line, strip newline 2016-01-05 21:43:14 +01:00
Hiltjo Posthuma e51ec34dbe refs: fix table id for tags 2016-01-05 21:42:51 +01:00
Hiltjo Posthuma 48a09a0f10 refs: remove link, it may be broken for non-HEAD 2016-01-05 21:42:34 +01:00
Hiltjo Posthuma a6b29cbbd9 make hunk line itself a link 2016-01-05 21:42:10 +01:00
Hiltjo Posthuma 99a8b8a296 style: darkblue for hunk like cgit, hunk line is now a link 2016-01-05 21:41:49 +01:00
Hiltjo Posthuma f17def25be stagit-index: owner is one line, strip newline 2016-01-05 21:41:03 +01:00
Hiltjo Posthuma 289ecda4aa example.sh: make symlinks to style, icons and index by default 2016-01-05 21:40:26 +01:00
Hiltjo Posthuma 4f318941d0 revert log.html to log/head.html change 2016-01-05 21:04:07 +01:00
Hiltjo Posthuma 200ccad8b5 fix newline after header 2016-01-05 21:03:39 +01:00
Hiltjo Posthuma 444e41b315 fix link to commit from log page 2016-01-04 23:55:39 +01:00
Hiltjo Posthuma a89e756c9e stagit: fix hunk header, thanks uggedal for reporting! 2016-01-04 23:41:40 +01:00
Hiltjo Posthuma 122af5015d update TODO 2016-01-03 22:44:05 +01:00
Hiltjo Posthuma 00fb6ea2b0 fix link in stagit-index, update documentation, add TODO 2016-01-03 22:42:00 +01:00
Hiltjo Posthuma f96ac27087 no log per branch
rename log.html to log/HEAD.html, small code cleanup
2016-01-03 22:36:48 +01:00
Hiltjo Posthuma 043609742f rename refs to refs/branches 2016-01-03 21:45:53 +01:00
Hiltjo Posthuma a83a75bb18 refs: add link to log per branch 2016-01-03 21:21:30 +01:00
Hiltjo Posthuma 465d72a6d2 refs: dont make a table when there are no tags, add spacing between 2016-01-03 21:15:13 +01:00
Hiltjo Posthuma e10f79ad2a add refs page (branches and tags)
quite some code is added, this will be cleaned up in a following code iteration.

- make sure to free some more allocated git objects.
- use fputs() asmuch as possible instead of fprintf().
- code cleanup
2016-01-03 21:06:03 +01:00
Hiltjo Posthuma c226554b64 improve README 2015-12-27 19:05:45 +01:00
Hiltjo Posthuma ef3f1ef854 add stagit.c 2015-12-26 21:07:47 +01:00
Hiltjo Posthuma 81dd454368 rename urmoms to stagit, improve documentation 2015-12-26 21:05:55 +01:00
Hiltjo Posthuma 8c58750b63 nvm, dont strip .git from bare repos 2015-12-26 20:58:28 +01:00
Hiltjo Posthuma 781beb4950 add example script to make repo index and files per dir 2015-12-26 20:46:33 +01:00
Hiltjo Posthuma 114899a22d rename EXTRAOBJ to COMPATOBJ 2015-12-26 20:11:59 +01:00
Hiltjo Posthuma 664e60ede5 Makefile: link for COMPAT 2015-12-26 13:08:41 +01:00
Hiltjo Posthuma 597e3cdbed add compat.h 2015-12-26 13:01:41 +01:00
Hiltjo Posthuma e4e03b3bf9 strip suffix .git used typically for bare repos 2015-12-26 12:57:33 +01:00
Hiltjo Posthuma 3da41fa5dd humanreadable filemodes (code from sbase ls) 2015-12-26 12:57:14 +01:00
Hiltjo Posthuma a7dd8c5f08 align filesize header right, minor code-style 2015-12-26 12:56:56 +01:00
Hiltjo Posthuma 9c7e2c5678 fix dirname for glibc 2015-12-26 12:56:23 +01:00
Hiltjo Posthuma 1778cba979 allow to specify clone url, displayed in header 2015-12-26 12:55:59 +01:00
Hiltjo Posthuma 955c3779ef update TODO 2015-12-26 12:54:44 +01:00
Hiltjo Posthuma 63a71643d0 index: highlight row on mouseover 2015-12-26 12:54:09 +01:00
Hiltjo Posthuma 9295d3f190 remove TODO from code, see TODO file 2015-12-25 17:49:54 +01:00