Commit graph

63 commits

Author SHA1 Message Date
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
a1da5157f9 Improve the README.md with the new intf. 2022-10-28 15:34:36 +02:00
3433ec4c6f Merge pull request 'Use deepen according what we have' (#22) from fix-pull-out-of-sync into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/22
2022-10-28 13:17:36 +00: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
631249e333 Merge pull request 'Fix the push function' (#20) from push-before-shallow into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/20
2022-10-28 13:11:34 +00: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
6d6b0bd9c7 Add README.md 2022-10-24 11:06:44 +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
4734261144 Merge pull request 'Delete useless pin-depends, everything were released' (#19) from delete-pin-depends into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/19
2022-10-21 14:49:23 +00:00
91c65b57df Delete useless pin-depends, everything were released 2022-10-21 16:47:53 +02:00
46dfef5d4a Merge pull request 'Fix bad bytes when we want to emit an empty PACK file' (#18) from empty-pack-file into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/18
2022-10-21 14:37:15 +00:00
da5ed53013 Fix bad bytes when we want to emit an empty PACK file 2022-10-21 16:36:55 +02:00
92b9e45451 Merge pull request 'Delete an assert false and replace it by an empty PACK file' (#17) from empty-pack-file into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/17
2022-10-21 14:24:52 +00:00
c4012613e3 Delete an assert false and replace it by an empty PACK file 2022-10-21 16:24:10 +02:00
9c02126c7d Merge pull request 'val size is part of mirage_kv.RO since 5.0.0, no need to specially export it' (#16) from no-need-for-size into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/16
2022-10-21 09:09:26 +00: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
781bc5b2d9 Merge pull request 'Functorize with PCLOCK' (#15) from functorize-pclock into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/15
2022-10-19 13:20:09 +00: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
7323b8f065 Merge pull request 'add-push' (#14) from add-push into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/14
2022-10-19 09:43:28 +00:00
3ff46e50ac Implement the push function 2022-10-19 11:37:41 +02:00
36ceb8a0cd The application requires git-unix 2022-10-19 11:37:12 +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
7be3a3dc62 Merge pull request 'Full implementation of git-kv over the Mirage_kv.RW intf.' (#10) from full-impl into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/10
2022-10-14 12:58:33 +00:00
6e1d80af4f Merge pull request 'Fix tests, we use %S to print segments' (#12) from fix-tests into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/12
2022-10-14 11:17:49 +00:00
c60a9c9a71 Speed-up to way to unserialize a PACK file 2022-10-14 13:16:45 +02:00
9fd76eeacf Fix tests, we use %S to print segments 2022-10-12 11:59:08 +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
d327bfe114 Merge pull request 'use hexdump instead of base64' (#9) from minor into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/9
2022-09-27 14:48:31 +00:00
ac32357910 use hexdump instead of base64 2022-09-27 16:45:34 +02:00
d3263053dc Merge pull request 'Implement a way to serialize the Git state' (#8) from store into main
Reviewed-on: https://git.robur.io/robur/git-kv/pulls/8
2022-09-27 14:30:49 +00: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
162f633a55 opam: add dependencies 2022-09-26 13:45:46 +02:00
682de3e8b8 fix search invocation so that something is found 2022-09-26 12:03:12 +02:00
79dd40ba70 adapt to opam lint 2022-09-26 11:31:14 +02:00