diff --git a/radicle-cli/examples/rad-checkout-repo-config-linux.md b/radicle-cli/examples/rad-checkout-repo-config-linux.md new file mode 100644 index 00000000..ff0917c9 --- /dev/null +++ b/radicle-cli/examples/rad-checkout-repo-config-linux.md @@ -0,0 +1,20 @@ +``` +$ cd heartwood +``` + +View the repository configuration: + +``` +$ cat .git/config +[core] + bare = false + repositoryformatversion = 0 + filemode = true + logallrefupdates = true +[remote "rad"] + url = rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi + fetch = +refs/heads/*:refs/remotes/rad/* +[branch "master"] + remote = rad + merge = refs/heads/master +``` diff --git a/radicle-cli/examples/rad-checkout-repo-config-macos.md b/radicle-cli/examples/rad-checkout-repo-config-macos.md new file mode 100644 index 00000000..2c2f8b66 --- /dev/null +++ b/radicle-cli/examples/rad-checkout-repo-config-macos.md @@ -0,0 +1,22 @@ +``` +$ cd heartwood +``` + +View the repository configuration: + +``` +$ cat .git/config +[core] + bare = false + repositoryformatversion = 0 + filemode = true + ignorecase = true + precomposeunicode = true + logallrefupdates = true +[remote "rad"] + url = rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi + fetch = +refs/heads/*:refs/remotes/rad/* +[branch "master"] + remote = rad + merge = refs/heads/master +``` diff --git a/radicle-cli/examples/rad-checkout.md b/radicle-cli/examples/rad-checkout.md index 4c8a9d27..29c71cff 100644 --- a/radicle-cli/examples/rad-checkout.md +++ b/radicle-cli/examples/rad-checkout.md @@ -57,20 +57,3 @@ $ git show-ref f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/heads/master f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/remotes/rad/master ``` - -View the repository configuration: - -``` -$ cat .git/config -[core] - bare = false - repositoryformatversion = 0 - filemode = true - logallrefupdates = true -[remote "rad"] - url = rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi - fetch = +refs/heads/*:refs/remotes/rad/* -[branch "master"] - remote = rad - merge = refs/heads/master -``` diff --git a/radicle-cli/tests/commands.rs b/radicle-cli/tests/commands.rs index 74a83b05..24006a71 100644 --- a/radicle-cli/tests/commands.rs +++ b/radicle-cli/tests/commands.rs @@ -122,6 +122,24 @@ fn rad_checkout() { [], ) .unwrap(); + + if cfg!(target_os = "linux") { + test( + "examples/rad-checkout-repo-config-linux.md", + copy.path(), + Some(&profile.home), + [], + ) + .unwrap(); + } else if cfg!(target_os = "macos") { + test( + "examples/rad-checkout-repo-config-macos.md", + copy.path(), + Some(&profile.home), + [], + ) + .unwrap(); + } } #[test]