Commits
- Commit:
c38351549d6f43b2ae0c8a074864216ab7ee8f4d
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
CI: add alpine linux
Add Alpine Linux to the list of CI checks. Alpine builds against muscl
rather than glibc by default, and there's been a few compilation
differenes to warrant having this distribution as a separate CI check.
- Commit:
342fc2e7fb95ddb5fbeec944db5e06f8b4e893ca
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
redirect jot(1) output instead of looping over it; ok tb@
- 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:
9fad5d8c4a361d55ab50c7d41ddb1353d76c7302
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
check return value of RB_INSERT; ok + memleak fix by op@
- 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:
678cfb9b87e886cfa180bf01335908e0e4acba1a
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix a double-free in an error case of cmd_checkout()
- Commit:
bd00a07c62ad3b363bcd50c100f4b45b9e452d02
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
sort references by date for packing; newer commits should be processed first
- Commit:
c8fc6d14c6e1f80c4c21a32c3e40a6bfe4638fcc
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add a -q (quiet) option to 'gotadmin pack'
- 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:
a086872af94cfb4c16769d9255ca2211552c5317
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make 'got tag' unlock the work tree earlier when creating tags
The work tree was only held open in order to find its got.conf file since
this file could contain a tagger name to use. Read the tagger name earlier.
Once the tagger name is known we can close the work tree already.
- Commit:
f23456fbfb95d8089a0126438d76525b5955a136
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make 'got tag -l' unlock the work tree earlier to allow other parallel commands
- Commit:
fe66084b58b0c7faa4fa6510bd049745023c6635
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make 'got cat' not search for a work tree if the -r option is used
Fixes failures in our test suite if 'got tag -l | less' is used in
the work tree while cmdline tests are running.
- 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:
f4a34a6642e41574ef08b632dcd005bfb35d02dd
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
leave work tree in a usable state after 'got rebase' fails path-prefix checks
reported by naddy
- 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:
a378df9ff9b56b9f071344e40911642c97beb051
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix typo in comment: navicate -> navigate
- Commit:
10f173fee1a4dcc3566febc4acb5adfe892745b3
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
pass an already open commit object to the blame callback
ok op@
- Commit:
945f922947fbf90d4ae30e870a0d0262cf12bea8
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
stop relying on commit cache for good performance of got_object_id_by_path()
Instead of internally opening and closing the same commit object over and
over again, require callers to pass an open commit object in. Avoids an
inherent dependency on the commit object cache for reasonable performance.
ok op@
- Commit:
7472ca4ef5ea6faebee012ddfbffd20fa9efddfb
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
rename variables in got_path_strip() for clarity; ok op@
- Commit:
d9db2ff90a20aac31e00f040738fd49a56b38d6b
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: allow to strip path components
Move some bits from the libexec helper to the main process so we know if
the patch was generated by git or not and finally document the automatic
stripping of a/ and b/ prefixes added by git-diff(1).
ok stsp@