diff --git a/CHANGELOG.md b/CHANGELOG.md index 271bd29..668e594 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [Unreleased] + +### Changed + +- **Breaking:** Built-in shortcodes (`gh:`, `gl:`, `cb:`) now default to SSH + URLs instead of HTTPS. The `gh config get git_protocol` detection has been + removed — behavior is now consistent across all three vendors and independent + of the `gh` CLI. + +### Added + +- `--protocol ` flag on `diecut new` for per-invocation override of + shortcode protocol. +- `DIECUT_GIT_PROTOCOL` environment variable for persistent shortcode protocol + preference. +- Dry-run output now prints the resolved clone URL (or local path) before any + clone is attempted. + ## [0.3.5](https://github.com/raiderrobert/diecut/compare/v0.3.4...v0.3.5) (2026-03-15) diff --git a/Cargo.lock b/Cargo.lock index ba4d69f..ed7c55b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -461,6 +461,7 @@ dependencies = [ "rstest", "serde", "serde_json", + "serial_test", "sha2", "tempfile", "tera", @@ -1491,12 +1492,27 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scc" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46e6f046b7fef48e2660c57ed794263155d713de679057f2d0c169bfc6e756cc" +dependencies = [ + "sdd", +] + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sdd" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" + [[package]] name = "semver" version = "1.0.27" @@ -1555,6 +1571,32 @@ dependencies = [ "serde", ] +[[package]] +name = "serial_test" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911bd979bf1070a3f3aa7b691a3b3e9968f339ceeec89e08c280a8a22207a32f" +dependencies = [ + "futures-executor", + "futures-util", + "log", + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a7d91949b85b0d2fb687445e448b40d322b6b3e4af6b44a29b21d9a5f33e6d9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sha2" version = "0.10.9" diff --git a/Cargo.toml b/Cargo.toml index 4f730dd..e8297e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,6 +39,7 @@ indexmap = { version = "2.11.4", features = ["serde"] } [dev-dependencies] rstest = "0.23" criterion = "0.5" +serial_test = "3" [[bench]] name = "benchmarks" diff --git a/README.md b/README.md index bd8be97..201d17c 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,12 @@ diecut list Example templates: [diecut-templates](https://github.com/raiderrobert/diecut-templates) +### Protocol + +Built-in shortcodes resolve to SSH URLs by default (e.g., `gh:user/repo` → +`git@github.com:user/repo.git`). To use HTTPS instead, pass `--protocol https` +or set `DIECUT_GIT_PROTOCOL=https` in your shell environment. + ## Documentation Full documentation: **[diecut.dev](https://diecut.dev/)** diff --git a/docs/src/content/docs/reference/commands.md b/docs/src/content/docs/reference/commands.md index e9b7818..99e17b7 100644 --- a/docs/src/content/docs/reference/commands.md +++ b/docs/src/content/docs/reference/commands.md @@ -25,6 +25,7 @@ diecut new