Commits
- Commit:
102d840de78061d9f313aaa557ef64f586932143
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
dropping unnecessary strlen()s
ok jamsek, stsp
- Commit:
6c24d194f2260b073d8e8ad3e756efa3ce20dd2e
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
change got_get_repo_tags' limit argument to size_t
The function already carefully avoids wrapping around zero. While
here add a sanity check for limit == 0, like what was previously done
for got_get_repo_commits().
- Commit:
087cc2fc09698b114296411034739df31c999471
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: make got_get_repo_commits take a size_t
and while here make sure 0 is rejected.
requested by, improvements and ok stsp@
- Commit:
7272b60a19e7deee3a1808cbda935e201074c50d
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: simplify got_get_repo_commits(): don't traverse all the commits!
In some cases (e.g. limit=1 for DIFF action) we could end up traversing
all the commits instead of fetching just the one requested. Needless to
say, this makes the diff page extremely slow.
reported by and ok stsp@
- Commit:
d8edcc947b59de53c551373983750441a33bbe02
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: fix some got_error_from_errno2/3 calls
it's not printf-like so %s don't make sense. Tweak the order of
the arguments to obtain the intended output.
- Commit:
72f5a11aff98b21aafaf38400707411549e7c12b
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: avoid needless double fseek()
got_gotweb_closefile() already takes care of rewinding before
truncating and closing, so no need to replicate here.
ok stsp@
- Commit:
aa2aecab69ed4f6ff9ab2a5bb7e32109cf95aefc
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: lower log priority of unexpected disconnections
no need to be so loud when a client disconnects earlier than expected,
log it only in verbose mode. Don't log GOT_ERR_CANCELLED too since
that is only used to communicate the callers that we need to stop.
ok stsp@
- Commit:
5e43aca66f1762b7612d9efb4b000575f1b7a3ab
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
oops, one was missing
- Commit:
a97a7b2d0f3aef38c682073294822e88e1c2ef1c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got_operations.c: use consistently a space before labels
makes diff prettier and easier to read; instead of the label we
have the function name in the hunk line.
- Commit:
c4c6774f44148ea66dc566dfdcf36f531f9e5291
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove fsync() from got_gotweb_closefile()
discussed with millert@
- Commit:
d00235d81cec70db37ca306ea1db137a5464982e
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
rename got_gotweb_flushfile -> got_gotweb_closefile
suggested and ok millert@
- Commit:
985ec13bc7dc1bc1885d8111e51ea98c619d0d4e
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make got_gotweb_flushfile always close the file
ok millert@
- Commit:
db26fc4c9b43331d8bc1536cc9f576724710b817
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
rename some local fdN vars after previous change
- Commit:
04b2c111f2cee68f0aa07855fcb7329a4913050b
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
simplify got_gotweb_openfile/flushfile
Return only the FILE *, and require only that to close subsequently.
Having to manage the file descriptor too makes using these functions
unnecessary complex.
millert@ agrees
- Commit:
4fccd2fe0ffbbc668b66abe63614470635f92f1b
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: configure: split out dependencies
Rather than assume all dependencies are required for all programs, split
them out.
This will make packaging easier, as well as splitting the code to use
subprojects.
Note that due to the use of config.h semantics, in most cases the
got_compat.h header file is now at the top of the .c file it is included
in, so that it can handle the system header inclusion properly.
- Commit:
98670ba726486c39efff220ab1e074c62023aae7
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: rework SHA detection
Simply the SHA detection by not predicating on libcrypto, but instead
checking individual header files.
- Commit:
4680f704353811c8bb6ce65eac3714d1bd200c26
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: remove sha1.h; found portably
Remove sha1.h as this is found portably across systems.
- Commit:
588a8092bc282294ee23585991e81586905a8fd4
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
include sha2.h too where sha1.h is included
In preparation for wide sha256 support; stsp@ agrees. Change done
mechanically with
find . -iname \*.[cy] -exec sam {} +
X ,x/<sha1\.h>/i/\n#include <sha2.h>
- Commit:
8f464e92b2e71ae647c139f4937a2390d159eec2
- From:
- Tracey Emery <tracey@traceyemery.net>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: abort tree and blob as well
- Commit:
ad5cb26d7ea1326e3b195caa3b459ea287aded90
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: abort blame if the client disconnect midway thru
Without setting err when the callback fails we continue the blame
machinery.
- Commit:
a66a4a5063151449b830f5510f00717296fa3c3d
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix mistaken instances returning NULL instead of err
While here, for consistency, check dup() return value for -1 rather than < 0.
ok stsp@
- Commit:
20bab626cf257964f66b059b436e4ce472971531
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: fix briefs/tags navigation overlap
Introduces a separate field for the "next" button (now called "More")
and adjusted the CSS/HTML so it's used. Finally, drops the old code used
to handle the pagination for the BRIEFS/COMMITS cases.
Needs a small hack for the time being, setting the action to TAGS. This
is due how qs->action is changed in gotweb.c while handling the request.
ok jamsek
- Commit:
ddcb4a8e2f7e106c22a6ca6ece0671a650ca627c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: delete always-true check
ok stsp@
- Commit:
42814e017658a8b924881e7675afac062eae984b
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: avoid full history traversal in briefs/commits
This purposefully breaks the 'previous' button in the commits and briefs
page. It's hard to find the parent of a commit since they can only be
iterated forward. The way the previous button was generated was to walk
the history from the HEAD down to the specified commit. This is costly
but more importantly leads to issue when dealing with paths that were
deleted from the repository.
Discussed with stsp and tracey, ok jamsek.
- Commit:
b4d10c2be91fc52b9f65798b6a4f55afbdd9f3eb
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: don't got_ref_list per-commit in got_get_repo_commits
It's wasteful since `refs' is already populated before the loop, and
released after. It also leaks the content of `refs' the first time the
loop is entered.
ok jamsek