Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irmin-cli: change --store irf to --store fs #2243

Merged
merged 2 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
wyn marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Unreleased

- **irmin-cli**
- Changed `--store irf` to `--store fs` to align the CLI with what is
published on the Irmin website (@wyn, #2243)

### Fixed

- **irmin-pack**
Expand Down
6 changes: 3 additions & 3 deletions src/irmin-cli/resolver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ module Store = struct
v spec (module S)

let mem = create Irmin_mem.Conf.spec (module Irmin_mem)
let irf = create Irmin_fs.Conf.spec (module Irmin_fs_unix)
let fs = create Irmin_fs.Conf.spec (module Irmin_fs_unix)

let http = function
| T { impl = Generic_keyed _; _ } ->
Expand Down Expand Up @@ -341,7 +341,7 @@ module Store = struct
[
("git", Fixed_hash git);
("git-mem", Fixed_hash git_mem);
("irf", Variable_hash irf);
("fs", Variable_hash fs);
("mem", Variable_hash mem);
("mem-http", Variable_hash (fun h c -> http (mem h c)));
("git-http", Fixed_hash (fun c -> http (git c)));
Expand Down Expand Up @@ -678,7 +678,7 @@ let infer_remote hash contents branch headers str =
let r =
if Sys.file_exists (str / ".git") then Store.git contents
else if Sys.file_exists (str / "store.dict") then Store.pack hash contents
else Store.irf hash contents
else Store.fs hash contents
in
match r with
| Store.T { impl; spec; _ } ->
Expand Down
2 changes: 1 addition & 1 deletion src/irmin-cli/resolver.mli
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ module Store : sig
t

val mem : hash -> contents -> t
val irf : hash -> contents -> t
val fs : hash -> contents -> t
val http : t -> t
val git : contents -> t
val pack : hash -> contents -> t
Expand Down
6 changes: 3 additions & 3 deletions test/irmin-cli/test_command_line.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Check for foo in ./test1
bar

Try getting foo from ./test1 using the wrong store type
$ irmin get --root ./test1 -s irf foo
$ irmin get --root ./test1 -s fs foo
<none>
[1]

Expand Down Expand Up @@ -85,8 +85,8 @@ Check that g/h/i has been deleted after merge
[1]

Check mismatched hash function
$ irmin set --root ./test-hash -s irf -h sha1 abc 123
$ irmin snapshot --root ./test-hash -s irf -h blake2b 2> /dev/null
$ irmin set --root ./test-hash -s fs -h sha1 abc 123
$ irmin snapshot --root ./test-hash -s fs -h blake2b 2> /dev/null
[1]

Clone a local repo
Expand Down