Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | m | EuAndreh | 2025-01-06 | 1 | -5/+269 |
| | |||||
* | m | EuAndreh | 2025-01-06 | 6 | -1118/+325 |
| | |||||
* | Cleanup repo, reinit in sh | EuAndreh | 2023-04-14 | 18 | -3602/+1322 |
| | |||||
* | src/gistatic.in: Fix HTML indentation (probably a typo while editing) | EuAndreh | 2021-09-08 | 1 | -1/+6 |
| | |||||
* | src/gistatic.in: Finish refs page with signatures, start commit pages | EuAndreh | 2021-09-08 | 1 | -20/+54 |
| | | | | | | | | | | - actually implement HTML escaping; - include cached_run for (hopefully) reusing across HTML generating functions; - include the repository name on the $CACHE_DIR; - use the existence of a .asc file to decide on which HTML to output on the refs page; - implement all FIXMEs but the WIP one on the commit HTML generation. | ||||
* | src/gistatic.in: Initial sh version | EuAndreh | 2021-09-08 | 1 | -0/+752 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I got a bit frustrated that libgit2 didn't offer an API or "git archive" commands. I started implementing generating tarballs from scratch in src/tar.c and I'm quite liking it: the specification is very small, and the code can be very simple, since all I'm doing is writing fresh tarballs, and not reading or updating them. However I felt a bit locked-in to libgit2 itself, and what a detour from my original goal that is, and the question "what should libgit2 provide" came up to my mind. This made me realize that libgit2 is playing catch-up with Git itself, for as long as Git doesn't explicit has an explicit API, a standard, a public version of its internal libgit.a, or something like that. In fact, I'm locked in to Git, even. So even though a C version would probably be much faster, it wouldn't really have less dependencies, and that's what I'm actually optimising for: having the software be as portable as possible. On that front, C is unbeatable with sh as a close second. But the extreme portability of C aren't being fully exploited here: libgit2 does depend on non-POSIX things like CMake (and quick grep even shows references to -D_GNU_SOURCE!!), and Git's Makefile itself isn't POSIX at all. The point is: by depending on either Git or libgit2, I'm already loosing many selling points of writing the software in C, and sh becomes much more attractive. Had existed a common DVCS interface that could make me decouple gistatic from Git somehow I would insist a bit more in C, but now I'm switching to sh. The fact that I was able to get further with sh in one sitting than I did with C shows that a) I'm a bit less fluent in C than I would like (at least for now ^^) and b) that it is actually much simpler to do. I am quite satisfied with the quality of C code that I got so far. The error handling and propagation is pretty robust, and the implementation is very disciplined. I did most of the development with Valgrind, and other sanitizers would help even further, with some fuzzers on top. | ||||
* | src/config.h.in: s/GISTATIC_CONFIG_H/CONFIG_H | EuAndreh | 2021-09-06 | 1 | -2/+2 |
| | |||||
* | Makefile: Generate src/config.h from src/config.h.in | EuAndreh | 2021-09-05 | 1 | -0/+9 |
| | |||||
* | src/lib.c: Remove duplicate definition of PROGNAME | EuAndreh | 2021-08-28 | 1 | -2/+0 |
| | |||||
* | src/lib.c: Mark local FILE* variable as const | EuAndreh | 2021-08-27 | 1 | -1/+1 |
| | |||||
* | src/*.c: Add newline between function return type and its name | EuAndreh | 2021-08-27 | 9 | -78/+164 |
| | | | | | | | | | | | | | The purpose of this change is two-fold: - make function and variable declarations grep-friendly (one can use a pattern /^fn_name/ to find the definition); - make the lines shorter, so less functions need to have their arguments span over many lines. This is more grep-friendly both for finding the function definition, but also for matching on the return type of the function or the variable. Update tests/c-lint.sh to enforce this. | ||||
* | src/lib.c: Stick to 80 columns | EuAndreh | 2021-08-24 | 1 | -1/+2 |
| | |||||
* | src/lib.{c,h}: Make args to gistatic_main() const | EuAndreh | 2021-08-24 | 2 | -2/+2 |
| | |||||
* | src/lib.c: Move unit_tests_gistatic to the end of the file | EuAndreh | 2021-08-24 | 1 | -19/+19 |
| | |||||
* | src/: Move logerr* functions to src/logerr.{c,h}; forward tarballs_fd to ↵ | EuAndreh | 2021-08-23 | 5 | -39/+220 |
| | | | | src/tar.c | ||||
* | src/tar.c: Add link to the reference specification | EuAndreh | 2021-08-22 | 1 | -0/+7 |
| | |||||
* | re 's/write_tarball_from_directory/tarball_write_from_directory/g' | EuAndreh | 2021-08-22 | 3 | -3/+3 |
| | |||||
* | src/: s/tarzify/tarball_write_from_directory/g | EuAndreh | 2021-08-22 | 3 | -3/+3 |
| | |||||
* | src/tar.c: tarzify(): Return 0 by default for now | EuAndreh | 2021-08-22 | 1 | -1/+1 |
| | |||||
* | src/lib.c: Fix logic condition for deciding when to generate tarbalss | EuAndreh | 2021-08-22 | 1 | -1/+1 |
| | |||||
* | src/lib.c: Write repo_tarballs_refs_each, calling stub tarzify() function | EuAndreh | 2021-08-22 | 3 | -18/+95 |
| | |||||
* | src/lib.c: Tweak test_start() name | EuAndreh | 2021-08-22 | 1 | -1/+1 |
| | |||||
* | src/lib.c: Add strsjoin() with tests | EuAndreh | 2021-08-22 | 1 | -0/+104 |
| | |||||
* | src/lib.c: Differentiate between -1 and other errors when looping through ↵ | EuAndreh | 2021-08-22 | 1 | -2/+10 |
| | | | | Git references | ||||
* | Rename src/gistatic.* src/lib.* | EuAndreh | 2021-08-22 | 4 | -10/+11 |
| | |||||
* | src/gistatic.c: Remove unused MSGs | EuAndreh | 2021-08-22 | 2 | -16/+8 |
| | |||||
* | Have a single top-level main for running unit-tests | EuAndreh | 2021-08-22 | 5 | -39/+27 |
| | | | | | | | | | | | | | | | | | | | Instead of each .c file becoming a self-standing .t executable file, and being run for executing the unit tests local to the file, now each .c becomes a .to object (akin to a .o object, but one where the -DTEST flag is given to the compiler). After that, all the .to objects are linked together in a gistatic-tests executable, in a equivalent way that all .o files get linked together in a gistatic executable. This change was necessary in order to allow dependencies between objects. The next task will be making a tar of a repository tree checkout, and src/gistatic.{o,to} will start depending on src/tar.{o,to}. If each file has its own main function when -DTEST is given, then I wont be able to link them together. I took the opportunity that I had to change the Makefile, and I improved the dependency between targets and dependencies greatly. From what I can tell now, it is correct. | ||||
* | src/gistatic.c: Remove .logo bogus color attribute | EuAndreh | 2021-08-22 | 1 | -4/+0 |
| | |||||
* | src/gistatic.c: Suppress "Download" and "Commit message" columns from tags ↵ | EuAndreh | 2021-08-22 | 1 | -27/+1 |
| | | | | table in refs.html | ||||
* | src/gistatic.c: repo_refs_({tag => tags}|{branch => branches})_each | EuAndreh | 2021-08-21 | 1 | -4/+4 |
| | |||||
* | src/gistatic.c: create functions for loops; encode refs.html page dynamic ↵ | EuAndreh | 2021-08-21 | 1 | -165/+196 |
| | | | | content | ||||
* | src/gistatic.c: Use <OBJECT>_<PART>_<VERB> nomenclature for function names | EuAndreh | 2021-08-21 | 1 | -15/+15 |
| | |||||
* | src/tests-lib.c: Move testing helper function and share it with other files | EuAndreh | 2021-08-21 | 4 | -26/+55 |
| | |||||
* | src/gistatic.c: Add dark mode CSS media query | EuAndreh | 2021-08-20 | 1 | -5/+39 |
| | |||||
* | src/gistatic.c: s/snapshots/tarballs/ | EuAndreh | 2021-08-20 | 1 | -9/+9 |
| | |||||
* | src/gistatic.c: Handle overflow of size_t values | EuAndreh | 2021-08-20 | 1 | -6/+73 |
| | |||||
* | src/gistatic.c: Reword comment on date format | EuAndreh | 2021-08-20 | 1 | -1/+1 |
| | |||||
* | src/gistatic.c: Write actual usage and help texts | EuAndreh | 2021-08-19 | 2 | -5/+30 |
| | |||||
* | src/gistatic.c: Include usage message on -h flag | EuAndreh | 2021-08-19 | 1 | -1/+1 |
| | |||||
* | src/gistatic.c: Enforce fn(void) rule | EuAndreh | 2021-08-19 | 1 | -11/+14 |
| | |||||
* | src/gistatic.c: Move main() to src/main.c | EuAndreh | 2021-08-19 | 3 | -6/+19 |
| | |||||
* | src/tar.{h,c}: Add src/tar.h | EuAndreh | 2021-08-19 | 2 | -1/+9 |
| | |||||
* | src/gistatic.c: Add <meta name="description" .../> to HTML <head> | EuAndreh | 2021-08-17 | 2 | -2/+10 |
| | |||||
* | src/gistatic.c: Split alt messages of index and repository pages | EuAndreh | 2021-08-17 | 2 | -49/+55 |
| | |||||
* | src/gistatic.c: Keep default <a> underline look | EuAndreh | 2021-08-17 | 1 | -5/+0 |
| | | | | | This is more accessible, as the links have the extra visual queue that they're links. | ||||
* | Add stub src/tar.c | EuAndreh | 2021-08-07 | 1 | -0/+15 |
| | |||||
* | src/gistatic.c: trim_newline() => strtrim(), trim more chars and a sequence ↵ | EuAndreh | 2021-08-06 | 1 | -14/+116 |
| | | | | of them | ||||
* | src/gistatic.c: Trim trailing newline of description files | EuAndreh | 2021-08-05 | 1 | -0/+55 |
| | |||||
* | tests/: Add integration tests, also test with Valgrind | EuAndreh | 2021-08-05 | 1 | -2/+2 |
| | |||||
* | Move tests/resources{ => /repositories}/repo* | EuAndreh | 2021-08-05 | 1 | -4/+6 |
| |