Commits
- Commit:
ec242592d329728975bf10a1196907167de7fed0
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
619de35f3933b60159828e7115fca7fdb9bbb5e8
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
reimplement object-ID set data structure on top of a hash table
Siphash suggested by jrick as a better alternative to murmurhash
for this use case.
with small fixes from and ok op@
- Commit:
5fe7b5c123dc6c89eef469130d89f90010102abb
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
speed up initial stage of packing by adding a "skip" commit color
The skip color marks boundary commits and their ancestors. Boundary commits
are reachable both via references which we want to exclude from the pack,
and via references which we want to include in the pack.
We continue processing commit history up to the point we are left with only
skip commits on the queue. This can speed up findtwixt() significantly and
avoids wrong results produced by the old algorithm which made no distinction
between "drop" and "skip".
This idea was first implemented by Michael Forney for git9:
https://git.9front.org/plan9front/plan9front/2e47badb88312c5c045a8042dc2ef80148e5ab47/commit.html
Michael's log message for git9 is reproduced below:
git/query: refactor graph painting algorithm (findtwixt, lca)
We now keep track of 3 sets during traversal:
- keep: commits we've reached from head commits
- drop: commits we've reached from tail commits
- skip: ancestors of commits in both 'keep' and 'drop'
Commits in 'keep' and/or 'drop' may be added later to the 'skip' set
if we discover later that they are part of a common subgraph of the
head and tail commits.
From these sets we can calculate the commits we are interested in:
lca commits are those in 'keep' and 'drop', but not in 'skip'.
findtwixt commits are those in 'keep', but not in 'drop' or 'skip'.
The "LCA" commit returned is a common ancestor such that there are no
other common ancestors that can reach that commit. Although there can
be multiple commits that meet this criteria, where one is technically
lower on the commit-graph than the other, these cases only happen in
complex merge arrangements and any choice is likely a decent merge
base.
Repainting is now done in paint() directly. When we find a boundary
commit, we switch our paint color to 'skip'. 'skip' painting does
not stop when it hits another color; we continue until we are left
with only 'skip' commits on the queue.
This fixes several mishandled cases in the current algorithm:
1. If we hit the common subgraph from tail commits first (if the tail
commit was newer than the head commit), we ended up traversing the
entire commit graph. This is because we couldn't distinguish
between 'drop' commits that were part of the common subgraph, and
those that were still looking for it.
2. If we traversed through an initial part of the common subgraph from
head commits before reaching it from tail commits, these commits
were returned from findtwixt even though they were also reachable
from tail commits.
3. In the same case as 2, we might end up choosing an incorrect
commit as the LCA, which is an ancestor of the real LCA.
- Commit:
ee7b409c1f35a02e204ac2e248414c19d73d6f41
- From:
- Theo Buehler <tb@openbsd.org>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make sure callers of got_object_idset_add() free data.
- Commit:
fc457d247e3308a380ad2a41fd5a81c048625751
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
revert 03c03172 "drop a commit right away if it matches an excluded commit"
This change resulted in a full history walk even when no objects will
be added to the pack file. Fix this regression by reverting the change.
- Commit:
e9371be612bea2c580aec05a65644f6585e31f42
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
for clarity, move the coloring loop from findtwixt() into a separate function
- Commit:
5faaa590496ab216fcb45ffd1846ff4dc425237f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove a pointless object-id dup/free dance in findtwixt()
- Commit:
21a0da85073bec1c322c554d9bba1ffba5fdf66b
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
don't forget to call the cancel callback while coloring commits in findtwixt()
- Commit:
dd111f75ac7152b2586f2ded82db5e80083dda44
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
in findtwixt(), drop a commit right away if it matches an excluded commit
- Commit:
0b819c411db361d628205284db65d324fa0f6811
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
the obj_types array in pack_create.c is no longer useful, remove it
- Commit:
a3a0e34e98c4f91a4b8fe53e24f82833a72e40a1
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make gotadmin pack -x option work with tag arguments
- Commit:
8eef427678ef08e2fe74a9a4c98f0a1190df5d73
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
in load_object_ids(), process "their" commits and tags in the same loop
No functional change, the end result is the same.
- Commit:
78a0087665b219f344e9aa2a9cd40bedb63d0f58
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix pack progress object counter for loose objects
Move pack progres object accounting to a single place. This makes
it easier to account for the case were only loose objects are packed.
A wrong amount of objects was reported before when packing loose ones.
- Commit:
857fde73cee7d4df6f410f2bdfa837b17b78d3ec
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
in pack progress output, remove excluded objects from 'found' objects counter
- Commit:
a605f678a4427d849df6c8fb3d4c316fdecee768
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix a bug where 'gotadmin pack' packed too many objects unless -a was used
- Commit:
db847d2c824a95ea25ca701e1f6273d3ce1d5b13
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
explicitly include <unistd.h> for close(2)
- Commit:
85220b0e5b67f98aad2ec495f80d6c31f7abfc81
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
print additional progress information while packing
ok op@
- Commit:
de47d040c7458d8bddac77ba76a8a5e61aa8eb44
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
cache a list of known pack index files when the repository is opened
Avoids overhead due to readdir calls while searching a pack index.
ok op@
- Commit:
1ee2d2bfee088d818f179dab74784a48f43abeca
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: pack-create: remove endian.h
endian.h is portably included on non-OpenBSD systems, so let that
mechanism determine if it should be included or not.
- Commit:
3a80116594f8baaed983c70c689d19a4d704e541
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
explicitly include <endian.h> for be32toh()
- Commit:
f9a643e8b740363d5cf068472042b500426fa0b2
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix pack.sh test failure from reuse-deltas patch by tweaking progress output
- Commit:
f9c2e8e5d5310b6b1cd22dcfc8f9f5d1d7a16d19
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
reuse existing deltas when creating pack files
tested by thomas, naddy, and myself
- Commit:
e8f02263080ea8f6ff76ae63d06d6de4c4212c55
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
compress delta data from delta_cache directly into pack file
- Commit:
510885f759bdcb9febc6710d120af30902c7173c
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
set a cap on the amount of memory we use to store encoded deltas
- Commit:
3b6ceab72113b16a8d3afc65aa69b935c753ffdf
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
encode short deltas in memory instead of writing them to a temporary file