Commits
- Commit:
ad6dd0bb6c5ebeafaa57204a04330df6658c3861
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotadmin cleanup: don't delete pack files that are too young
similar to what we do for loose objects, avoid deleting pack files
that were created "too soon" unless -a is given. This prevents
races when gotadmin load, got fetch or gotd are installing a new
pack file and a concurrent gotadmin clean attempts to remove it.
ok stsp
- Commit:
77c65f86323fa18ae23ab5bb93c486a0c840f308
- From:
- Omar Polo <op@omarpolo.com>
- Date:
purge_redundant_pack(): don't special-case .pack or .idx
leftover, the error handling of unlink() a couple of lines below used
to carry a similar special-casing but was dropped; drop it here too.
- Commit:
0317ab6c0ce48babb19e46067d8677892bee130c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
take reachability in consideration when cleaning redundant packfiles
This wraps the cleaning up of loose objects and redundant pack files
under a new functions, making the _prepare() and _complete() functions
unnecessary. It walks the reachable commits unconditionally since
that information is always needed and adapt how we purge loose
objects after this change.
The progress function is changed too and we log `ncommits' first,
followed by the number of loose objects, followed by the rest.
Pack files are now considered redundant when all their objects are
provided by a bigger pack or are unreachable.
ok stsp
- Commit:
0d23c640a51b599b99c9fe781c54e1bd371bc433
- From:
- Omar Polo <op@omarpolo.com>
- Date:
unfold a line
- Commit:
f528b33ecc8d05209f34af6472acdbc70f51d285
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
use _POSIX_HOST_NAME_MAX from <limits.h> for portability
ok stsp
- Commit:
5852c834af2b4ead86c14a9e8a7f242183b7244b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
rate-limit redundant pack cleanup progress output
- Commit:
900499fd0de2c868694828487244f097de63289e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix cleanup progress reporting output
- Commit:
3bf0e21f50b11c683f08a06c8ab362fe220adc2b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add a lock for the cleanup operation
This adds the functions got_repo_cleanup_prepare() and _complete()
to lock/unlock the repository to prevent multiple `gotadmin cleanup'
or `git gc' operations to run in parallel.
improvements and ok stsp@
- Commit:
9a7c12cfb1e1a7e36813ba8898c5281d5a0dbc30
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotadmin cleanup: remove redundant pack files
improvements and ok stsp@
- Commit:
b54930d53597467f9112f45e9bfd192e352531ac
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add got_repo_get_object_format()
and use it to avoid hardcoding the digest type in a few places.
ok stsp@
- Commit:
87a3ab84d3eb87b790e3d34aeec2c344a8d7375b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
provide functions to parse/serialize different hashes
it abstracts over the hash type and ensures that object ids are zero'ed
before their sha1 digest is written. Needed by the incoming sha256
support.
ok stsp@
- Commit:
53bf0b541977b66862040d4b633fb6b5d3a3c6c8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rename lib/sha1.c to lib/hash.c
It will soon grow functions to deal with sha256 too. stsp@ agrees.
- Commit:
5822e79e39a8777984e08b5d89a8c55d6aa0356d
- From:
- Omar Polo <op@omarpolo.com>
- 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:
c7a4fcc8bebad9dc0bd1183fec3bd405dd4ebc57
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotadmin pack: add a -D flag to force using ref-delta
Intended mostly for the regress suite, so we'll be able to test also the
ref-delta code paths.
ok stsp@
- Commit:
839bbaae43d84a7eb75ef0b327239fd36c360ada
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotd, gotadmin: install packfiles and index files as 0444
gotd used 0600 (due to mkstemps(3)), gotadmin 0644; change it to 0444
since packfiles shouldn't change once created. Mirrors what git does.
ok stsp@
- Commit:
b90054ed55f30ebe28115abf5ad9cecc2b925713
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use mkstemps(3) instead of mkstemp(3) for opening named temporary files
Allows 'got commit' to use a ".diff" suffix for temporary diff files.
ok op@
- Commit:
cae60ab8f2a261b006b3ccbded2d53dccbd6f300
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
let callers of got_pack_create() configure rate-limiting of progress reporting
Needed by future gotd(8), where progress reports will be sent to a network
socket, rather than a local terminal.
- Commit:
a32780aad7a4bc8539de9e7fd39b371f2fe8c346
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move got_opentempfd() call out of got_pack_create()
Future gotd(8) needs to run got_pack_create() in a chroot environment,
so we can no longer open new temporary files inside got_pack_create().
ok op@
- Commit:
894e4711ffca9e21b24e567a610d387bd0c31817
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make got_pack_create() write to a file descriptor instead of a stdio FILE
The old code required a seekable output file. This conflicts with requirements
of future gotd(8), which will write pack file data to network sockets.
ok op@
- Commit:
5e91dae4dd43b8024731223110ab18f505f453ac
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove trailing whitespace; patch by Josiah Frentsos
- Commit:
2edc2f9dc130b3033b3ac7fe72754b2e6ef15dc7
- From:
- Florian Obser <florian@narrans.de>
- Date:
If the first readdir() returns NULL err is uninitialized.
This can't happen in practice, but llvm's scan-build doesn't know this.
OK stsp
- Commit:
d7b5a0e827bb38e5c8502f0ba8d7838fedaba19b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
inline struct got_object_id in struct got_object_qid
Saves us from doing a malloc/free call for every item on the list.
ok op@
- Commit:
7e4f461f98ca8599ac26846e9ca24d621574f33b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
sort references by date for packing; newer commits should be processed first
- Commit:
8934ea8b1b31166ea1f3f857e6f51f8dd6a999a2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
factorize imsg_clear calls after imsg_flush failures
imsg_clear frees and closes resources allocated as part of enqueueing
imsgs so it's a no-op after reads.
discussed with and ok stsp@
- Commit:
67fd68496517d3103b130a1085efdd4591bd7416
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
reuse existing deltas when creating pack files
tested by thomas, naddy, and myself