Commit graph

56 commits

Author SHA1 Message Date
1315580463 Stream in/out the PACK file 2024-02-22 13:41:56 +01:00
948dfd81ba Merge pull request 'Add few Lwt.pause to give an opportunity for other processes to run' (#32) from pause into main
Reviewed-on: #32
2024-02-12 09:30:23 +00:00
cbfba38063 minor tweaks 2024-02-11 22:44:58 +01:00
1264fdad0a Add the compression level argument into to_octets 2024-02-11 22:44:58 +01:00
0832c0fde9 Add few Lwt.pause to give an opportunity for other processes to run 2024-02-11 12:35:57 +01:00
999e9d6968
Add the documentation about Git_kv.branch 2023-03-15 11:45:17 +01:00
a8ab45f2be
Add the branch accessor 2023-03-15 11:43:36 +01:00
f5fa3857c1 change_and_push: be able to specify author and message 2022-12-15 13:29:19 +01:00
d27fd751e1 support for mirage-kv 6.0.0 (#27)
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/27
2022-12-14 15:43:09 +00:00
cb37018a84 avoid Result.get_ok, as suggested by @reynir, to preserve the error 2022-11-05 14:57:55 +01:00
45657fdf32 change_and_push may return an error, report it 2022-11-04 10:48:44 +01:00
8e14c13ddc use Git.Reference.main, avoid msgf binding only used once 2022-11-04 10:43:27 +01:00
8c7562ea16 avoid rresult, use result instead 2022-11-04 10:42:30 +01:00
6fdede7310 M-x whitespace-cleanup 2022-11-04 10:41:40 +01:00
2cfcb0a714 Rename batch to change_and_push (and implement batch as noop) 2022-10-31 18:13:15 +01:00
ed3bfa2dc3 Improve the documentation and the README.md 2022-10-31 16:47:52 +01:00
64fc2402ab Don't try to push if the tree_root still is the same
If the user just read into the batched function and does not change anything,
we just return the result.
2022-10-29 22:30:12 +02:00
b5fa25d9a5 Implement the batch function according to the documentation
This implementation is much more close to the documentation & fold all
changes into one commit. Then, it pushes this commit remotely. This
commit deleted local changes which complexify the codebase for a
questionable interest. As the documentation said, any changes are
delayed and not directly "committed" until the end of the given
function. For instance:
> batch
> set /bar "Bar"
> exists /bar
/bar does not exists

is an expected behavior. Only after a quit (which delimit the end of the
batch process), /bar will be committed and will exist!
2022-10-29 21:18:10 +02:00
e16dcce930 Rename batch to change_and_push and re-instantiate batch as a noop function 2022-10-28 16:38:32 +02:00
7b388c029a Use deepen according what we have.
If we have nothing, we just want the last commit, if we have something, we want
commits between what we have and what the server has. Then, we shallow
correctly our internal store to still keep only one commit.
2022-10-28 15:14:26 +02:00
993db937f8 Don't retry if push fail into the batch function 2022-10-28 14:14:40 +02:00
6bf4dc7f07 Improve the documentation 2022-10-28 11:56:11 +02:00
5aa887f48f Be sure to shallow to our last commit after a push from batch 2022-10-28 11:13:18 +02:00
d7765ff6aa Shallow only when we push 2022-10-28 10:59:27 +02:00
934ed7d960 Serialize sequence of batches operations 2022-10-28 10:49:59 +02:00
98bd2bfe3c Implement correctly a batch operation (which will push at the end of the given closure and provide a Local sub-module to be able to manipulate the Git repository without connections 2022-10-27 16:29:12 +02:00
30d5ad365a Complete the implementation with push and improve the documentation 2022-10-24 10:44:21 +02:00
d49a406691 Fix set and remove function 2022-10-22 00:46:33 +02:00
bc99b9d25f And don't forget to set the reference with the last commit 2022-10-22 00:35:41 +02:00
d1cfefb53b Implement {set,remove,rename}_and_push and delete push function
All of these actions "shallow" the last commit. A subsequent `push`
will do nothing due to that incapacity to walk through the history
due to the shallowed commit. To be able to push the last change,
we must provide {set,remove,rename} functions with an explicit
call to push **before** the "shallow".
2022-10-22 00:18:01 +02:00
da5ed53013 Fix bad bytes when we want to emit an empty PACK file 2022-10-21 16:36:55 +02:00
c4012613e3 Delete an assert false and replace it by an empty PACK file 2022-10-21 16:24:10 +02:00
49c406bc01 val size is part of mirage_kv.RO since 5.0.0, no need to specially export it 2022-10-21 01:24:05 +02:00
52c9f3aac6 Improve the documentation 2022-10-19 15:17:31 +02:00
a5aedf8c90 Be sure to shallow the last commit we made when we set the store 2022-10-19 13:04:15 +02:00
83be2b3f25 Functorize git-kv with Pclock to save the right time when we commit 2022-10-19 13:00:04 +02:00
3ff46e50ac Implement the push function 2022-10-19 11:37:41 +02:00
1a236e190b Merge pull request 'Speed-up to way to unserialize a PACK file' (#13) from speed-up into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/13
2022-10-14 12:58:48 +00:00
c60a9c9a71 Speed-up to way to unserialize a PACK file 2022-10-14 13:16:45 +02:00
5bf7476f80 Full implementation of git-kv over the Mirage_kv.RW intf. 2022-09-28 13:21:28 +02:00
8e8f002d5e revive get_partial and size (needed by mirage-kv 5) 2022-09-27 17:09:48 +02:00
6c58b74f6a remove superfluous file 2022-09-27 17:08:32 +02:00
ccc29951c2 Finally, make the first PoC about git-state 2022-09-27 14:07:51 +02:00
4dafa3a942 Add a way to unserialize a state and reconstruct the Git store 2022-09-26 19:25:16 +02:00
e6254f0439 Add a way to serialize Git objects into a block device 2022-09-26 19:24:55 +02:00
682de3e8b8 fix search invocation so that something is found 2022-09-26 12:03:12 +02:00
6e565ae92a Fix the pull and usage of branch 2022-09-23 12:39:36 +02:00
ea305b7ad6 Add the diff impl. and use it into the pull function 2022-09-21 14:43:41 +02:00
503bf47ccb Implement list function 2022-09-21 12:02:34 +02:00
ad09080ee6 Remove an assert false and return an error instead of 2022-09-21 12:02:19 +02:00