|
e45f7eba
|
2022-05-14T18:55:37
|
|
got patch: switch from fseek() to fseeko(), use unary minus while here
ok op
|
|
be33dff7
|
2022-05-13T15:28:04
|
|
got patch: fail when reading empty hunks
|
|
6d9c73d7
|
2022-05-10T11:46:02
|
|
bump version number
|
|
1dc7dca2
|
2022-05-10T11:40:59
|
|
CHANGES for 0.70
|
|
e93fb944
|
2022-05-10T11:34:16
|
|
map delta cache file into memory if possible while writing a pack file
with a fix from + ok op@
|
|
dc3fe1bf
|
2022-05-10T11:24:12
|
|
fix load_object_ids() such that packing tags works if zero commits are packed
reported by jrick and op
|
|
cab5dc8b
|
2022-05-10T11:22:34
|
|
hook cmdline send tests up for 'make regress', this was forgotten
|
|
fae7e038
|
2022-05-07T11:50:56
|
|
run the search for deltas to reuse in got-read-pack
This significantly speeds up the deltification step of packing by
avoiding imsg traffic. gotadmin no longer requests individual raw
deltas from got-read-pack to check whether it can reuse them.
Instead, got-read-pack obtains a list of objects we want to pack,
and hands back the list of all deltas in its pack file which can be
reused. Messages are now batched such that imsg buffers are filled
as much as possible.
Another advantage is that deltas we are not going to reuse will
no longer be written to the delta cache file, saving disk space.
Before this patch, any raw delta candidate was written to the
delta cache file by got-read-pack, and the decision whether to
reuse the delta happened afterwards in the gotadmin process.
Code for reading individual raw deltas is now unused and could be
removed at some point.
ok op@
|
|
2f8438b0
|
2022-05-04T15:39:15
|
|
avoid 'remove unused' loop by storing excluded objects in a separate set
ok op@
|
|
f5e78e05
|
2022-05-04T15:39:15
|
|
avoid loop over the ID set which removes objects IDs with reused deltas
ok op@
|
|
2d9e6abf
|
2022-05-04T13:43:24
|
|
store deltas in compressed form while packing, both in memory and cache file
This reduces memory and disk space consumption during packing.
with tweaks + memleak on error fix from op@
ok op@
|
|
6b7665ac
|
2022-05-02T09:31:24
|
|
s/empty/done forgot in previous commit
|
|
d75b9573
|
2022-05-02T08:48:10
|
|
got-read-patch: rename `ok' variable and simplify the parsing a bit
|
|
f90b7a8c
|
2022-05-02T08:39:41
|
|
trailing whitespaces
|
|
4379a9aa
|
2022-05-02T08:38:43
|
|
got patch: handle git-style rename diffs
extend the support for git-style diffs to include the "pure rename"
case, i.e. when a file is renamed without any edits.
ok stsp@
|
|
611e8e31
|
2022-05-01T11:47:21
|
|
avoid subtraction of values larger than int in qsort(3) comparison callbacks
tweak + ok tb@
|
|
a8acad7d
|
2022-04-24T13:26:30
|
|
bump version number
|
|
45b17929
|
2022-04-24T13:22:15
|
|
CHANGES for 0.69
|
|
45ca4633
|
2022-04-23T11:02:06
|
|
add -q to "gotadmin pack" usage
|
|
bad961bf
|
2022-04-23T10:39:47
|
|
got patch: allow to reverse a patch
add a flag to got_patch to reverse a patch before applying and the -R
flag for `got patch'.
ok stsp@
|
|
b2832778
|
2022-04-23T10:39:47
|
|
got-read-patch: preserve all \ lines
as a cheap optimization got-read-patch was sending only the "\ No
newline at end of file" lines that follows an addition (a "+" line). To
be able to reverse patches in the future got_patch needs to know about
all of these lines instead. No functional changes intended.
ok stsp@
|
|
15e1bda6
|
2022-04-23T10:26:47
|
|
test `got patch' vs path-prefixes, relative paths and strip
reminded by and 'looks fine' to stsp@
|
|
f1d6cebb
|
2022-04-23T09:33:14
|
|
typos
|
|
86187278
|
2022-04-23T08:09:03
|
|
mention -p in usage_patch
|
|
ed3bff83
|
2022-04-23T07:56:18
|
|
got patch: resolve paths from the current working directory
this allow to apply patches from subdirectories of the work tree root.
Prodded by naddy@, ok stsp@.
|
|
a05fb460
|
2022-04-23T07:54:56
|
|
don't pass relative paths to get_file_status
|
|
41a37a44
|
2022-04-23T07:49:42
|
|
fix wrong path in error message
|
|
d7b5a0e8
|
2022-04-20T14:00:12
|
|
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@
|
|
cbc287dc
|
2022-04-19T20:08:41
|
|
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@
|
|
3313bcd8
|
2022-04-19T16:57:25
|
|
delete trailing whitespaces
|
|
728ed142
|
2022-04-19T15:09:57
|
|
simplify apply_unveil in cmd_patch: the worktree is not optional
|
|
c036d108
|
2022-04-15T18:14:01
|
|
redirect jot(1) output instead of looping over it; ok tb@
|
|
70f8f24d
|
2022-04-14T15:05:19
|
|
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.
|
|
a7472cb3
|
2022-04-14T15:00:59
|
|
check return value of RB_INSERT; ok + memleak fix by op@
|
|
bb6672b6
|
2022-04-14T11:51:32
|
|
make sure callers of got_object_idset_add() free data.
|
|
3d1a1e4c
|
2022-04-13T19:35:01
|
|
fix a double-free in an error case of cmd_checkout()
|
|
7e4f461f
|
2022-04-13T14:01:18
|
|
sort references by date for packing; newer commits should be processed first
|
|
20e420c8
|
2022-04-11T13:33:54
|
|
add a -q (quiet) option to 'gotadmin pack'
|
|
fbafdecf
|
2022-04-10T13:03:29
|
|
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.
|
|
14dbbf48
|
2022-04-10T12:15:46
|
|
for clarity, move the coloring loop from findtwixt() into a separate function
|
|
1d765da3
|
2022-04-10T12:13:02
|
|
remove a pointless object-id dup/free dance in findtwixt()
|
|
57bc7b6d
|
2022-04-10T12:10:52
|
|
don't forget to call the cancel callback while coloring commits in findtwixt()
|
|
03c03172
|
2022-04-10T12:08:45
|
|
in findtwixt(), drop a commit right away if it matches an excluded commit
|
|
912a163e
|
2022-04-10T11:35:53
|
|
the obj_types array in pack_create.c is no longer useful, remove it
|
|
ffd9dda7
|
2022-04-10T11:34:02
|
|
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.
|
|
2a261ce7
|
2022-04-09T17:40:16
|
|
make 'got tag -l' unlock the work tree earlier to allow other parallel commands
|
|
a091f71a
|
2022-04-09T17:37:21
|
|
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.
|
|
29e0594f
|
2022-04-09T17:34:51
|
|
make gotadmin pack -x option work with tag arguments
|
|
67ba6161
|
2022-04-08T09:14:02
|
|
leave work tree in a usable state after 'got rebase' fails path-prefix checks
reported by naddy
|
|
9d34261e
|
2022-04-07T20:55:39
|
|
in load_object_ids(), process "their" commits and tags in the same loop
No functional change, the end result is the same.
|
|
820e4466
|
2022-04-07T17:56:18
|
|
fix typo in comment: navicate -> navigate
|
|
392891ce
|
2022-04-07T13:20:47
|
|
pass an already open commit object to the blame callback
ok op@
|
|
a44927cc
|
2022-04-07T12:57:31
|
|
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@
|
|
c655fd93
|
2022-04-07T12:04:42
|
|
rename variables in got_path_strip() for clarity; ok op@
|
|
9d6cabd5
|
2022-04-07T09:28:59
|
|
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@
|
|
49c543a6
|
2022-03-31T20:41:38
|
|
use test(1) -eq and -ne to compare integers, and reduce quoting
This brings the rest of the regression test scripts in line with
patch.sh.
|
|
fbbb53b9
|
2022-03-25T23:08:27
|
|
remove trailing whitespaces
|
|
c0591751
|
2022-03-24T12:17:45
|
|
link libexec helpers against _p libraries when building with 'make PROFILE=1'
|
|
3e99fbc5
|
2022-03-23T20:59:29
|
|
plug a memory leak in list_refs(), ok stsp@
|
|
bc5e881a
|
2022-03-23T20:55:26
|
|
plug a memory leak in got_fetch_pack(); patch by Mikhail
|
|
08d50867
|
2022-03-22T13:51:13
|
|
bump version number
|
|
ce15c8e2
|
2022-03-22T13:43:21
|
|
CHANGES for 0.68
|
|
e260f8ae
|
2022-03-22T11:55:38
|
|
fgetc() returns int, not char; fixes -Werror build on armv7
|
|
f2e1007b
|
2022-03-22T11:32:07
|
|
sync dist file list
|
|
1a4ff8fa
|
2022-03-22T11:28:47
|
|
fix free() on uninitialized variable upon error in gw_output_file_blame()
ok op@
|
|
1a7a534e
|
2022-03-22T11:22:12
|
|
tweak wording to make it clearer where the mentioned -u option applies
|
|
b3c57ab2
|
2022-03-22T11:20:46
|
|
got patch: handle "\ No newline at end of file"
|
|
4027dbc2
|
2022-03-22T11:20:46
|
|
reuse apply_hunk in patch_file when creating a file
|
|
3b01d641
|
2022-03-22T11:19:46
|
|
mention that 'got patch' is compatible with 'cvs diff -u' output
|
|
3f3a6472
|
2022-03-22T11:17:41
|
|
mention that 'got patch' can read diffs produced by Git, to avoid any doubt
|
|
6863cbf9
|
2022-03-21T19:59:03
|
|
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.
|
|
c4e796b2
|
2022-03-21T16:08:41
|
|
in pack progress output, remove excluded objects from 'found' objects counter
|
|
cdeb891a
|
2022-03-21T15:52:15
|
|
fix a bug where 'gotadmin pack' packed too many objects unless -a was used
|
|
e38d4cde
|
2022-03-21T13:14:13
|
|
subordinate clauses preceding the main clause are offset by a comma
|
|
0ae61b79
|
2022-03-21T10:17:40
|
|
fix potential NULL deref in error path of got_object_idset_remove()
|
|
7a30b5cb
|
2022-03-20T08:54:45
|
|
got patch: prefer new name if not /dev/null and not a git-style diff
This fixes a common issue when for e.g. generating patches with
$ diff -u foo.orig foo
where 'got patch' failed because 'foo.orig' has an 'unexpected status'.
prodded by naddy, ok stsp
|
|
f134ecfd
|
2022-03-19T21:25:59
|
|
const-ify string table
|
|
78f5ac24
|
2022-03-19T15:06:37
|
|
move got_patch file status checking in worktree.c
check_file_status used got_worktree_status to check if the file was in
an allowed state, but it's wrong since the callback is not invoked on
unchanged files.
While here also fix a relate bug: unlink(newpath) is in the wrong spot
and ends up removing files even when it shouldn't, so move it early in
the got_worktree_schedule_* error handling.
Finally, update the appropriate test case. It was passing before
because got_worktree_schedule_add returned GOT_ERR_FILE_STATUS, not
because check_file_status failed.
ok stsp@
|
|
bfc73a47
|
2022-03-19T14:53:07
|
|
explicitly include <unistd.h> for close(2)
|
|
70cc9832
|
2022-03-19T14:19:19
|
|
move got_errors[] table into a single compilation unit (error.c)
ok stsp
|
|
39d5d1d2
|
2022-03-17T20:20:08
|
|
rm unused vars
|
|
d58ddaf3
|
2022-03-17T20:02:40
|
|
const-ify tables
ok thomas_adam millert
|
|
46ebad13
|
2022-03-17T16:38:43
|
|
style
|
|
60aa1fa0
|
2022-03-17T16:38:43
|
|
augment patch progress callback with hunks info; recover from errors
Augment got_patch_progress_cb by providing the hunks that were applied
with offset (or that failed) and the recoverable error encountered
during the operation (bad status, missing file, ...)
got_patch now proceeds when a file fails to be patched and exits with
GOT_ERR_PATCH_FAILED if no other errors are encountered.
While here, also add a test for the 'hunk applied with offset' case and
shrink test_patch_dont_apply and illegal_status by taking advantage that
'got patch' doesn't stop at the first error. (And add some other cases
to illegal_status too.)
discussed with and ok stsp@
|
|
95d68340
|
2022-03-16T18:23:03
|
|
got patch: create missing directories when adding files
ok stsp@
|
|
2be5e1a2
|
2022-03-16T18:23:03
|
|
got patch: keep permissions after patching a file
ok stsp@
|
|
b22138f5
|
2022-03-16T15:41:10
|
|
introduce got_patch_progress_cb
This introduce a proper got_patch specific progress callback that is
invoked after processing a patch. It also drops the hackish printf in
the modified case and takes `nop' out of the struct got_patch.
ok stsp
|
|
b8af7c06
|
2022-03-15T10:45:02
|
|
print additional progress information while packing
ok op@
|
|
c560c1f5
|
2022-03-14T13:50:31
|
|
don't `goto done' if calloc fails
otherwise we call got_repo_close with repo being NULL and segfault
there.
ok stsp
|
|
9b576444
|
2022-03-14T13:22:20
|
|
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@
|
|
899fcfdf
|
2022-03-13T20:31:44
|
|
add a dry-run/nop mode for got patch
with lots of help from stsp for the manpage bits!
|
|
986288a6
|
2022-03-13T19:51:12
|
|
fix weird paragraph breaks in 'got patch' man page section
|
|
3e72b288
|
2022-03-13T19:46:23
|
|
more 'got patch' man page tweaks
|
|
750a3093
|
2022-03-13T18:32:04
|
|
some man page tweaks for 'got patch'
ok op@
|
|
5b67f96e
|
2022-03-13T15:36:59
|
|
got patch: require exact match when removing files
|
|
dd6c3779
|
2022-03-13T15:36:56
|
|
improve `got patch' section of the manpage
Simplify some phrasing, explain what preconditions `got patch' has and
what happens to the work tree when an error occurs.
|
|
dbda770b
|
2022-03-13T15:36:56
|
|
check file status before applying the patch
Don't allow `got patch' to delete files that are not known, or add files
that are already known and to edit files that are known, not obstructed
and without conflicts.
|
|
a84c0d30
|
2022-03-12T21:30:23
|
|
fix 'got status' with an obstructed file given as argument; found by Omar
|
|
f7fce2e2
|
2022-03-12T19:29:39
|
|
make got log, diff, blame, tree, and cat unlock the work tree earlier
These commands perform potentially long-running operations on the
repository after reading information from the work tree. There is no
need for them to keep the work tree locked until the end. Doing so
blocks other commands the user may want to run concurrently. For example,
the user may want to be able to run 'got diff' in the work tree while
browsing 'got log' output in less(1).
Pointed out by Misha on gameoftrees IRC.
|
|
6e96b326
|
2022-03-12T16:02:51
|
|
refactor apply_patch to support renaming files
add two helper functions (schedule_add, schedule_del) and move the guts
of apply_patch into a new function `patch_file'. This simplifies
apply_patch and makes easier to figure out what happens.
Then, drop GOT_ERR_PATCH_PATHS_DIFFER since we allow the to rename
files.
|