summaryrefslogtreecommitdiffstats
path: root/vendor/gix-command
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
commit10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87 (patch)
treebdffd5d80c26cf4a7a518281a204be1ace85b4c1 /vendor/gix-command
parentReleasing progress-linux version 1.70.0+dfsg1-9~progress7.99u1. (diff)
downloadrustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.tar.xz
rustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.zip
Merging upstream version 1.70.0+dfsg2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-command')
-rw-r--r--vendor/gix-command/.cargo-checksum.json1
-rw-r--r--vendor/gix-command/CHANGELOG.md204
-rw-r--r--vendor/gix-command/Cargo.toml28
-rw-r--r--vendor/gix-command/src/lib.rs141
-rw-r--r--vendor/gix-command/tests/command.rs116
5 files changed, 490 insertions, 0 deletions
diff --git a/vendor/gix-command/.cargo-checksum.json b/vendor/gix-command/.cargo-checksum.json
new file mode 100644
index 000000000..7a1c2fb6f
--- /dev/null
+++ b/vendor/gix-command/.cargo-checksum.json
@@ -0,0 +1 @@
+{"files":{"CHANGELOG.md":"9ff0c15102135929747b763db3c78b775bbdfcd739cce950e7a69a943aa3d967","Cargo.toml":"d13e0ef5f1b3f8b15d2410678fd11b7aa3eb5d9e7176d9433518568df2b65c23","src/lib.rs":"a8149c52abe2f2c2f9883a816ceff553bd67eff1e05aae591df0a12edcbbbbd9","tests/command.rs":"e90efbeeba0bb1a7ff73a4ec74d51452a3add994cc77ec8182fb4f2b86ff326f"},"package":"b2c6f75c1e0f924de39e750880a6e21307194bb1ab773efe3c7d2d787277f8ab"} \ No newline at end of file
diff --git a/vendor/gix-command/CHANGELOG.md b/vendor/gix-command/CHANGELOG.md
new file mode 100644
index 000000000..e8952c7cb
--- /dev/null
+++ b/vendor/gix-command/CHANGELOG.md
@@ -0,0 +1,204 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## 0.2.4 (2023-02-20)
+
+### Bug Fixes
+
+ - <csr-id-e14dc7d475373d2c266e84ff8f1826c68a34ab92/> note that crates have been renamed from `git-*` to `gix-*`.
+ This also means that the `git-*` prefixed crates of the `gitoxide` project
+ are effectively unmaintained.
+ Use the crates with the `gix-*` prefix instead.
+
+ If you were using `git-repository`, then `gix` is its substitute.
+ - <csr-id-135d317065aae87af302beb6c26bb6ca8e30b6aa/> compatibility with `bstr` v1.3, use `*.as_bytes()` instead of `.as_ref()`.
+ `as_ref()` relies on a known target type which isn't always present. However, once
+ there is only one implementation, that's no problem, but when that changes compilation
+ fails due to ambiguity.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 1 commit contributed to the release.
+ - 3 days passed between releases.
+ - 1 commit was understood as [conventional](https://www.conventionalcommits.org).
+ - 0 issues like '(#ID)' were seen in commit messages
+
+### Commit Details
+
+<csr-read-only-do-not-edit/>
+
+<details><summary>view details</summary>
+
+ * **Uncategorized**
+ - compatibility with `bstr` v1.3, use `*.as_bytes()` instead of `.as_ref()`. ([`135d317`](https://github.com/Byron/gitoxide/commit/135d317065aae87af302beb6c26bb6ca8e30b6aa))
+</details>
+
+## 0.2.3 (2023-02-17)
+
+A maintenance release without user-facing changes.
+
+### New Features (BREAKING)
+
+ - <csr-id-3d8fa8fef9800b1576beab8a5bc39b821157a5ed/> upgrade edition to 2021 in most crates.
+ MSRV for this is 1.56, and we are now at 1.60 so should be compatible.
+ This isn't more than a patch release as it should break nobody
+ who is adhering to the MSRV, but let's be careful and mark it
+ breaking.
+
+ Note that `git-features` and `git-pack` are still on edition 2018
+ as they make use of a workaround to support (safe) mutable access
+ to non-overlapping entries in a slice which doesn't work anymore
+ in edition 2021.
+
+### New Features
+
+ - <csr-id-8a67c13bf0b9b8646430876768155f62e243ef52/> allow setting more information when preparing commands.
+ This includes
+
+ - disallowing the usage of a shell
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 83 commits contributed to the release over the course of 176 calendar days.
+ - 2 commits were understood as [conventional](https://www.conventionalcommits.org).
+ - 3 unique issues were worked on: [#450](https://github.com/Byron/gitoxide/issues/450), [#470](https://github.com/Byron/gitoxide/issues/470), [#691](https://github.com/Byron/gitoxide/issues/691)
+
+### Commit Details
+
+<csr-read-only-do-not-edit/>
+
+<details><summary>view details</summary>
+
+ * **[#450](https://github.com/Byron/gitoxide/issues/450)**
+ - Allow programs to communicate errors by default ([`5a2168e`](https://github.com/Byron/gitoxide/commit/5a2168e62f664d463fc8849efecccf7e90b382cd))
+ - fix docs ([`f86364c`](https://github.com/Byron/gitoxide/commit/f86364c4e2d9efd04027978679232946494a4734))
+ - fix CI ([`6565b97`](https://github.com/Byron/gitoxide/commit/6565b97d7d293ae881590960bf3e29f46fdb2cd1))
+ - remove `allow prompt` builder method as typical prompt implementations don't need it ([`0236d75`](https://github.com/Byron/gitoxide/commit/0236d753805003d5a09505fab7da0b5b47392c45))
+ - A builder method to allow prompts specifically ([`3be1fc7`](https://github.com/Byron/gitoxide/commit/3be1fc7d97f87893cecbe5d880576ab690bb205f))
+ - Only actually use the shell if it appears to be required ([`830ee07`](https://github.com/Byron/gitoxide/commit/830ee07d943725e55a40a546b3a1b7ecefb75c4b))
+ - support for multiple arguments with shell-script support ([`d8e8b54`](https://github.com/Byron/gitoxide/commit/d8e8b541bd776a267aca6dbfb8e7e793e264885b))
+ - Squelch errors by default ([`1cb2e96`](https://github.com/Byron/gitoxide/commit/1cb2e967416b0fa5c6d32a0ad0b015b41f81e92c))
+ - Add a way to transform a `Prepare` into a `Command` for even more flexibility ([`eeedd2c`](https://github.com/Byron/gitoxide/commit/eeedd2cab3c201109aa5bd986eb38c1f31d5fd20))
+ - set version to 0.1 to avoid surprises like happened with `git-date` ([`1322f72`](https://github.com/Byron/gitoxide/commit/1322f72fd2bd310c1c3c859ee4b49f47cdfaf100))
+ - add remaining docs ([`6a39e62`](https://github.com/Byron/gitoxide/commit/6a39e62bb4aebf9c48daddf007c95b2117b4454d))
+ - basic support for 'sh' based execution ([`8c61b0b`](https://github.com/Byron/gitoxide/commit/8c61b0bded71dff223e24ae68f8cf7fc50195ce9))
+ - First sketch of git-command API ([`cd4a608`](https://github.com/Byron/gitoxide/commit/cd4a608f0b8ef3adeb7a7f1979f653b63e77ad4d))
+ - prepare changelog prior to release ([`579e8f1`](https://github.com/Byron/gitoxide/commit/579e8f138963a057d87837301b097fd804424447))
+ - first frame of `git-command` crate ([`436632a`](https://github.com/Byron/gitoxide/commit/436632a3822d3671c073cdbbbaf8e569de62bb09))
+ * **[#470](https://github.com/Byron/gitoxide/issues/470)**
+ - fix dependency declaration ([`9a8369d`](https://github.com/Byron/gitoxide/commit/9a8369db9cd91a4f7447dc2d363bfb1972e5e9b1))
+ - update changelogs prior to release ([`caa7a1b`](https://github.com/Byron/gitoxide/commit/caa7a1bdef74d7d3166a7e38127a59f5ab3cfbdd))
+ * **[#691](https://github.com/Byron/gitoxide/issues/691)**
+ - set `rust-version` to 1.64 ([`55066ce`](https://github.com/Byron/gitoxide/commit/55066ce5fd71209abb5d84da2998b903504584bb))
+ * **Uncategorized**
+ - Release gix-config v0.16.1, gix-command v0.2.3, gix-prompt v0.3.2, gix-url v0.13.2, gix-credentials v0.9.1, gix-diff v0.26.1, gix-discover v0.13.0, gix-hashtable v0.1.1, gix-bitmap v0.2.1, gix-traverse v0.22.1, gix-index v0.12.3, gix-mailmap v0.9.2, gix-chunk v0.4.1, gix-pack v0.30.2, gix-odb v0.40.2, gix-packetline v0.14.2, gix-transport v0.25.4, gix-protocol v0.26.3, gix-revision v0.10.3, gix-refspec v0.7.2, gix-worktree v0.12.2, gix v0.36.0 ([`41d57b9`](https://github.com/Byron/gitoxide/commit/41d57b98964094fc1528adb09f69ca824229bf25))
+ - Release gix-attributes v0.8.2, gix-config-value v0.10.1, gix-tempfile v3.0.2, gix-lock v3.0.2, gix-validate v0.7.2, gix-object v0.26.1, gix-ref v0.24.0, gix-sec v0.6.2, gix-config v0.16.1, gix-command v0.2.3, gix-prompt v0.3.2, gix-url v0.13.2, gix-credentials v0.9.1, gix-diff v0.26.1, gix-discover v0.13.0, gix-hashtable v0.1.1, gix-bitmap v0.2.1, gix-traverse v0.22.1, gix-index v0.12.3, gix-mailmap v0.9.2, gix-chunk v0.4.1, gix-pack v0.30.2, gix-odb v0.40.2, gix-packetline v0.14.2, gix-transport v0.25.4, gix-protocol v0.26.3, gix-revision v0.10.3, gix-refspec v0.7.2, gix-worktree v0.12.2, gix v0.36.0 ([`e313112`](https://github.com/Byron/gitoxide/commit/e31311257bd138b52042dea5fc40c3abab7f269b))
+ - Release gix-features v0.26.4, gix-actor v0.17.1, gix-glob v0.5.3, gix-path v0.7.1, gix-quote v0.4.1, gix-attributes v0.8.2, gix-config-value v0.10.1, gix-tempfile v3.0.2, gix-lock v3.0.2, gix-validate v0.7.2, gix-object v0.26.1, gix-ref v0.24.0, gix-sec v0.6.2, gix-config v0.16.1, gix-command v0.2.3, gix-prompt v0.3.2, gix-url v0.13.2, gix-credentials v0.9.1, gix-diff v0.26.1, gix-discover v0.13.0, gix-hashtable v0.1.1, gix-bitmap v0.2.1, gix-traverse v0.22.1, gix-index v0.12.3, gix-mailmap v0.9.2, gix-chunk v0.4.1, gix-pack v0.30.2, gix-odb v0.40.2, gix-packetline v0.14.2, gix-transport v0.25.4, gix-protocol v0.26.3, gix-revision v0.10.3, gix-refspec v0.7.2, gix-worktree v0.12.2, gix v0.36.0 ([`6efd0d3`](https://github.com/Byron/gitoxide/commit/6efd0d31fbeca31ab7319aa2ac97bb31dc4ce055))
+ - Release gix-date v0.4.2, gix-hash v0.10.2, gix-features v0.26.4, gix-actor v0.17.1, gix-glob v0.5.3, gix-path v0.7.1, gix-quote v0.4.1, gix-attributes v0.8.2, gix-config-value v0.10.1, gix-tempfile v3.0.2, gix-lock v3.0.2, gix-validate v0.7.2, gix-object v0.26.1, gix-ref v0.24.0, gix-sec v0.6.2, gix-config v0.16.1, gix-command v0.2.3, gix-prompt v0.3.2, gix-url v0.13.2, gix-credentials v0.9.1, gix-diff v0.26.1, gix-discover v0.13.0, gix-hashtable v0.1.1, gix-bitmap v0.2.1, gix-traverse v0.22.1, gix-index v0.12.3, gix-mailmap v0.9.2, gix-chunk v0.4.1, gix-pack v0.30.2, gix-odb v0.40.2, gix-packetline v0.14.2, gix-transport v0.25.4, gix-protocol v0.26.3, gix-revision v0.10.3, gix-refspec v0.7.2, gix-worktree v0.12.2, gix v0.36.0 ([`6ccc88a`](https://github.com/Byron/gitoxide/commit/6ccc88a8e4a56973b1a358cf72dc012ee3c75d56))
+ - Merge branch 'rename-crates' into inform-about-gix-rename ([`c9275b9`](https://github.com/Byron/gitoxide/commit/c9275b99ea43949306d93775d9d78c98fb86cfb1))
+ - rename `git-testtools` to `gix-testtools` ([`b65c33d`](https://github.com/Byron/gitoxide/commit/b65c33d256cfed65d11adeff41132e3e58754089))
+ - adjust to renaming of `git-pack` to `gix-pack` ([`1ee81ad`](https://github.com/Byron/gitoxide/commit/1ee81ad310285ee4aa118118a2be3810dbace574))
+ - adjust to renaming of `git-odb` to `gix-odb` ([`476e2ad`](https://github.com/Byron/gitoxide/commit/476e2ad1a64e9e3f0d7c8651d5bcbee36cd78241))
+ - adjust to renaming of `git-index` to `gix-index` ([`86db5e0`](https://github.com/Byron/gitoxide/commit/86db5e09fc58ce66b252dc13b8d7e2c48e4d5062))
+ - adjust to renaming of `git-diff` to `gix-diff` ([`49a163e`](https://github.com/Byron/gitoxide/commit/49a163ec8b18f0e5fcd05a315de16d5d8be7650e))
+ - adjust to renaming of `git-commitgraph` to `gix-commitgraph` ([`f1dd0a3`](https://github.com/Byron/gitoxide/commit/f1dd0a3366e31259af029da73228e8af2f414244))
+ - adjust to renaming of `git-mailmap` to `gix-mailmap` ([`2e28c56`](https://github.com/Byron/gitoxide/commit/2e28c56bb9f70de6f97439818118d3a25859698f))
+ - adjust to renaming of `git-discover` to `gix-discover` ([`53adfe1`](https://github.com/Byron/gitoxide/commit/53adfe1c34e9ea3b27067a97b5e7ac80b351c441))
+ - adjust to renaming of `git-chunk` to `gix-chunk` ([`59194e3`](https://github.com/Byron/gitoxide/commit/59194e3a07853eae0624ebc4907478d1de4f7599))
+ - adjust to renaming of `git-bitmap` to `gix-bitmap` ([`75f2a07`](https://github.com/Byron/gitoxide/commit/75f2a079b17489f62bc43e1f1d932307375c4f9d))
+ - adjust to renaming for `git-protocol` to `gix-protocol` ([`823795a`](https://github.com/Byron/gitoxide/commit/823795addea3810243cab7936cd8ec0137cbc224))
+ - adjust to renaming of `git-refspec` to `gix-refspec` ([`c958802`](https://github.com/Byron/gitoxide/commit/c9588020561577736faa065e7e5b5bb486ca8fe1))
+ - adjust to renaming of `git-revision` to `gix-revision` ([`ee0ee84`](https://github.com/Byron/gitoxide/commit/ee0ee84607c2ffe11ee75f27a31903db68afed02))
+ - adjust to renaming of `git-transport` to `gix-transport` ([`b2ccf71`](https://github.com/Byron/gitoxide/commit/b2ccf716dc4425bb96651d4d58806a3cc2da219e))
+ - adjust to renaming of `git-credentials` to `gix-credentials` ([`6b18abc`](https://github.com/Byron/gitoxide/commit/6b18abcf2856f02ab938d535a65e51ac282bf94a))
+ - adjust to renaming of `git-prompt` to `gix-prompt` ([`6a4654e`](https://github.com/Byron/gitoxide/commit/6a4654e0d10ab773dd219cb4b731c0fc1471c36d))
+ - adjust to renaming of `git-command` to `gix-command` ([`d26b8e0`](https://github.com/Byron/gitoxide/commit/d26b8e046496894ae06b0bbfdba77196976cd975))
+ - rename `git-command` to `gix-command` ([`4d32925`](https://github.com/Byron/gitoxide/commit/4d32925012d88838ef7edbd3882eed1cf76d4600))
+ - adjust to renaming of `git-packetline` to `gix-packetline` ([`5cbd22c`](https://github.com/Byron/gitoxide/commit/5cbd22cf42efb760058561c6c3bbcd4dab8c8be1))
+ - adjust to renaming of `git-worktree` to `gix-worktree` ([`73a1282`](https://github.com/Byron/gitoxide/commit/73a12821b3d9b66ec1714d07dd27eb7a73e3a544))
+ - adjust to renamining of `git-worktree` to `gix-worktree` ([`108bb1a`](https://github.com/Byron/gitoxide/commit/108bb1a634f4828853fb590e9fc125f79441dd38))
+ - adjust to renaming of `git-url` to `gix-url` ([`b50817a`](https://github.com/Byron/gitoxide/commit/b50817aadb143e19f61f64e19b19ec1107d980c6))
+ - adjust to renaming of `git-date` to `gix-date` ([`9a79ff2`](https://github.com/Byron/gitoxide/commit/9a79ff2d5cc74c1efad9f41e21095ae498cce00b))
+ - adjust to renamining of `git-attributes` to `gix-attributes` ([`4a8b3b8`](https://github.com/Byron/gitoxide/commit/4a8b3b812ac26f2a2aee8ce8ca81591273383c84))
+ - adjust to renaminig of `git-quote` to `gix-quote` ([`648025b`](https://github.com/Byron/gitoxide/commit/648025b7ca94411fdd0d90c53e5faede5fde6c8d))
+ - adjust to renaming of `git-config` to `gix-config` ([`3a861c8`](https://github.com/Byron/gitoxide/commit/3a861c8f049f6502d3bcbdac752659aa1aeda46a))
+ - adjust to renaming of `git-ref` to `gix-ref` ([`1f5f695`](https://github.com/Byron/gitoxide/commit/1f5f695407b034377d94b172465ff573562b3fc3))
+ - adjust to renaming of `git-lock` to `gix-lock` ([`2028e78`](https://github.com/Byron/gitoxide/commit/2028e7884ae1821edeec81612f501e88e4722b17))
+ - adjust to renaming of `git-tempfile` to `gix-tempfile` ([`b6cc3eb`](https://github.com/Byron/gitoxide/commit/b6cc3ebb5137084a6327af16a7d9364d8f092cc9))
+ - adjust to renaming of `git-object` to `gix-object` ([`fc86a1e`](https://github.com/Byron/gitoxide/commit/fc86a1e710ad7bf076c25cc6f028ddcf1a5a4311))
+ - adjust to renaming of `git-actor` to `gix-actor` ([`4dc9b44`](https://github.com/Byron/gitoxide/commit/4dc9b44dc52f2486ffa2040585c6897c1bf55df4))
+ - adjust to renaming of `git-validate` to `gix-validate` ([`5e40ad0`](https://github.com/Byron/gitoxide/commit/5e40ad078af3d08cbc2ca81ce755c0ed8a065b4f))
+ - adjust to renaming of `git-hash` to `gix-hash` ([`4a9d025`](https://github.com/Byron/gitoxide/commit/4a9d0257110c3efa61d08c8457c4545b200226d1))
+ - adjust to renaming of `git-features` to `gix-features` ([`e2dd68a`](https://github.com/Byron/gitoxide/commit/e2dd68a417aad229e194ff20dbbfd77668096ec6))
+ - adjust to renaming of `git-glob` to `gix-glob` ([`35b2a3a`](https://github.com/Byron/gitoxide/commit/35b2a3acbc8f2a03f151bc0a3863163844e0ca86))
+ - adjust to renaming of `git-sec` to `gix-sec` ([`eabbb92`](https://github.com/Byron/gitoxide/commit/eabbb923bd5a32fc80fa80f96cfdc2ab7bb2ed17))
+ - adapt to renaming of `git-path` to `gix-path` ([`d3bbcfc`](https://github.com/Byron/gitoxide/commit/d3bbcfccad80fc44ea8e7bf819f23adaca06ba2d))
+ - adjust to rename of `git-config-value` to `gix-config-value` ([`622b3e1`](https://github.com/Byron/gitoxide/commit/622b3e1d0bffa0f8db73697960f9712024fac430))
+ - Release git-date v0.4.2, git-hash v0.10.2, git-features v0.26.2, git-actor v0.17.1, git-glob v0.5.3, git-path v0.7.1, git-quote v0.4.1, git-attributes v0.8.2, git-config-value v0.10.1, git-tempfile v3.0.2, git-lock v3.0.2, git-validate v0.7.2, git-object v0.26.1, git-ref v0.24.0, git-sec v0.6.2, git-config v0.16.0, git-command v0.2.3, git-prompt v0.3.2, git-url v0.13.2, git-credentials v0.9.1, git-diff v0.26.1, git-discover v0.13.0, git-hashtable v0.1.1, git-bitmap v0.2.1, git-traverse v0.22.1, git-index v0.12.3, git-mailmap v0.9.2, git-chunk v0.4.1, git-pack v0.30.2, git-odb v0.40.2, git-packetline v0.14.2, git-transport v0.25.4, git-protocol v0.26.3, git-revision v0.10.2, git-refspec v0.7.2, git-worktree v0.12.2, git-repository v0.34.0, safety bump 3 crates ([`c196d20`](https://github.com/Byron/gitoxide/commit/c196d206d57a310b1ce974a1cf0e7e6d6db5c4d6))
+ - prepare changelogs prior to release ([`7c846d2`](https://github.com/Byron/gitoxide/commit/7c846d2102dc767366771925212712ef8cc9bf07))
+ - Release git-ref v0.23.0, git-config v0.15.0, git-command v0.2.2, git-diff v0.26.0, git-discover v0.12.0, git-mailmap v0.9.0, git-pack v0.30.0, git-odb v0.40.0, git-transport v0.25.2, git-protocol v0.26.1, git-revision v0.10.0, git-refspec v0.7.0, git-worktree v0.12.0, git-repository v0.32.0 ([`ffb5b6a`](https://github.com/Byron/gitoxide/commit/ffb5b6a21cb415315db6fd5294940c7c6deb4538))
+ - prepare changelogs prior to release ([`4381a03`](https://github.com/Byron/gitoxide/commit/4381a03a34c305f31713cce234c2afbf8ac60f01))
+ - fix warning on windows ([`3569b9f`](https://github.com/Byron/gitoxide/commit/3569b9f4412c98b21c1f7045cc2cf8e84ccd33f0))
+ - Release git-features v0.26.0, git-actor v0.16.0, git-attributes v0.8.0, git-object v0.25.0, git-ref v0.22.0, git-config v0.14.0, git-command v0.2.1, git-url v0.13.0, git-credentials v0.9.0, git-diff v0.25.0, git-discover v0.11.0, git-traverse v0.21.0, git-index v0.11.0, git-mailmap v0.8.0, git-pack v0.29.0, git-odb v0.39.0, git-transport v0.25.0, git-protocol v0.26.0, git-revision v0.9.0, git-refspec v0.6.0, git-worktree v0.11.0, git-repository v0.31.0, safety bump 24 crates ([`5ac9fbe`](https://github.com/Byron/gitoxide/commit/5ac9fbe265a5b61c533a2a6b3abfed2bdf7f89ad))
+ - prepare changelogs prior to release ([`30d8ca1`](https://github.com/Byron/gitoxide/commit/30d8ca19284049dcfbb0de2698cafae1d1a16b0c))
+ - make fmt ([`511ed00`](https://github.com/Byron/gitoxide/commit/511ed0000397a5b268530c8f5362e7d25b7c1594))
+ - Merge branch 'adjustments-for-cargo' ([`f8c562a`](https://github.com/Byron/gitoxide/commit/f8c562a559e6dc3377583cc7200585dad7c3d481))
+ - allow setting more information when preparing commands. ([`8a67c13`](https://github.com/Byron/gitoxide/commit/8a67c13bf0b9b8646430876768155f62e243ef52))
+ - Merge branch 'main' into http-config ([`bcd9654`](https://github.com/Byron/gitoxide/commit/bcd9654e56169799eb706646da6ee1f4ef2021a9))
+ - Release git-hash v0.10.0, git-features v0.24.0, git-date v0.3.0, git-actor v0.14.0, git-glob v0.5.0, git-path v0.6.0, git-quote v0.4.0, git-attributes v0.6.0, git-config-value v0.9.0, git-tempfile v3.0.0, git-lock v3.0.0, git-validate v0.7.0, git-object v0.23.0, git-ref v0.20.0, git-sec v0.5.0, git-config v0.12.0, git-command v0.2.0, git-prompt v0.2.0, git-url v0.11.0, git-credentials v0.7.0, git-diff v0.23.0, git-discover v0.9.0, git-bitmap v0.2.0, git-traverse v0.19.0, git-index v0.9.0, git-mailmap v0.6.0, git-chunk v0.4.0, git-pack v0.27.0, git-odb v0.37.0, git-packetline v0.14.0, git-transport v0.23.0, git-protocol v0.24.0, git-revision v0.7.0, git-refspec v0.4.0, git-worktree v0.9.0, git-repository v0.29.0, git-commitgraph v0.11.0, gitoxide-core v0.21.0, gitoxide v0.19.0, safety bump 28 crates ([`b2c301e`](https://github.com/Byron/gitoxide/commit/b2c301ef131ffe1871314e19f387cf10a8d2ac16))
+ - prepare changelogs prior to release ([`e4648f8`](https://github.com/Byron/gitoxide/commit/e4648f827c97e9d13636d1bbdc83dd63436e6e5c))
+ - Merge branch 'version2021' ([`0e4462d`](https://github.com/Byron/gitoxide/commit/0e4462df7a5166fe85c23a779462cdca8ee013e8))
+ - upgrade edition to 2021 in most crates. ([`3d8fa8f`](https://github.com/Byron/gitoxide/commit/3d8fa8fef9800b1576beab8a5bc39b821157a5ed))
+ - Merge branch 'diff' ([`25a7726`](https://github.com/Byron/gitoxide/commit/25a7726377fbe400ea3c4927d04e9dec99802b7b))
+ - Release git-command v0.1.0, git-prompt v0.1.0, git-url v0.9.0, git-credentials v0.5.0, git-diff v0.19.0, git-mailmap v0.4.0, git-chunk v0.3.2, git-pack v0.23.0, git-odb v0.33.0, git-packetline v0.13.0, git-transport v0.20.0, git-protocol v0.20.0, git-revision v0.5.0, git-refspec v0.2.0, git-repository v0.24.0, git-commitgraph v0.9.0, gitoxide-core v0.18.0, gitoxide v0.16.0 ([`f5c36d8`](https://github.com/Byron/gitoxide/commit/f5c36d85755d1f0f503b77d9a565fad6aecf6728))
+ - Release git-hash v0.9.10, git-features v0.22.5, git-date v0.2.0, git-actor v0.12.0, git-glob v0.4.0, git-path v0.5.0, git-quote v0.3.0, git-attributes v0.4.0, git-config-value v0.8.0, git-tempfile v2.0.5, git-validate v0.6.0, git-object v0.21.0, git-ref v0.16.0, git-sec v0.4.0, git-config v0.8.0, git-discover v0.5.0, git-traverse v0.17.0, git-index v0.5.0, git-worktree v0.5.0, git-testtools v0.9.0, git-command v0.1.0, git-prompt v0.1.0, git-url v0.9.0, git-credentials v0.5.0, git-diff v0.19.0, git-mailmap v0.4.0, git-chunk v0.3.2, git-pack v0.23.0, git-odb v0.33.0, git-packetline v0.13.0, git-transport v0.20.0, git-protocol v0.20.0, git-revision v0.5.0, git-refspec v0.2.0, git-repository v0.24.0, git-commitgraph v0.9.0, gitoxide-core v0.18.0, gitoxide v0.16.0, safety bump 28 crates ([`29a043b`](https://github.com/Byron/gitoxide/commit/29a043be6808a3e9199a9b26bd076fe843afe4f4))
+ - make fmt ([`535e967`](https://github.com/Byron/gitoxide/commit/535e967666c6da657ff1b7eff7c64ab27cafb182))
+ - Merge branch 'filter-refs-by-spec' ([`5c05198`](https://github.com/Byron/gitoxide/commit/5c051986bd89590a9287d85d84c713d83dfab83a))
+ - thanks clippy ([`0dc1da5`](https://github.com/Byron/gitoxide/commit/0dc1da5e636b2eecc26fcfa0ecd814af3b78ed29))
+ - Release git-command v0.0.0 ([`6c27e94`](https://github.com/Byron/gitoxide/commit/6c27e94c8ed6fb6155704a04d876ab6129b3b413))
+</details>
+
+## 0.2.2 (2023-01-09)
+
+A maintenance release without user-facing changes.
+
+## 0.2.1 (2022-12-30)
+
+### New Features
+
+ - <csr-id-8a67c13bf0b9b8646430876768155f62e243ef52/> allow setting more information when preparing commands.
+ This includes
+
+ - disallowing the usage of a shell
+
+## 0.2.0 (2022-11-21)
+
+### New Features (BREAKING)
+
+ - <csr-id-3d8fa8fef9800b1576beab8a5bc39b821157a5ed/> upgrade edition to 2021 in most crates.
+ MSRV for this is 1.56, and we are now at 1.60 so should be compatible.
+ This isn't more than a patch release as it should break nobody
+ who is adhering to the MSRV, but let's be careful and mark it
+ breaking.
+
+ Note that `gix-features` and `gix-pack` are still on edition 2018
+ as they make use of a workaround to support (safe) mutable access
+ to non-overlapping entries in a slice which doesn't work anymore
+ in edition 2021.
+
+## 0.1.0 (2022-09-20)
+
+The first usable release.
+
+## 0.0.0 (2022-08-25)
+
+Initial release to reserve the name.
+
diff --git a/vendor/gix-command/Cargo.toml b/vendor/gix-command/Cargo.toml
new file mode 100644
index 000000000..7eebb3100
--- /dev/null
+++ b/vendor/gix-command/Cargo.toml
@@ -0,0 +1,28 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g., crates.io) dependencies.
+#
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
+
+[package]
+edition = "2021"
+rust-version = "1.64"
+name = "gix-command"
+version = "0.2.4"
+authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
+description = "A WIP crate of the gitoxide project handling internal git command execution"
+license = "MIT/Apache-2.0"
+repository = "https://github.com/Byron/gitoxide"
+
+[lib]
+doctest = false
+
+[dependencies.bstr]
+version = "1.3.0"
+
+[dev-dependencies]
diff --git a/vendor/gix-command/src/lib.rs b/vendor/gix-command/src/lib.rs
new file mode 100644
index 000000000..9e662b016
--- /dev/null
+++ b/vendor/gix-command/src/lib.rs
@@ -0,0 +1,141 @@
+//! Launch commands very similarly to `Command`, but with `git` specific capabilities and adjustments.
+#![deny(rust_2018_idioms, missing_docs)]
+#![forbid(unsafe_code)]
+
+use std::ffi::OsString;
+
+/// A structure to keep settings to use when invoking a command via [`spawn()`][Prepare::spawn()], after creating it with [`prepare()`].
+pub struct Prepare {
+ /// The command to invoke (either with or without shell depending on `use_shell`.
+ pub command: OsString,
+ /// The way standard input is configured.
+ pub stdin: std::process::Stdio,
+ /// The way standard output is configured.
+ pub stdout: std::process::Stdio,
+ /// The way standard error is configured.
+ pub stderr: std::process::Stdio,
+ /// The arguments to pass to the spawned process.
+ pub args: Vec<OsString>,
+ /// environment variables to set in the spawned process.
+ pub env: Vec<(OsString, OsString)>,
+ /// If `true`, we will use `sh` to execute the `command`.
+ pub use_shell: bool,
+}
+
+mod prepare {
+ use std::{
+ ffi::OsString,
+ process::{Command, Stdio},
+ };
+
+ use bstr::ByteSlice;
+
+ use crate::Prepare;
+
+ /// Builder
+ impl Prepare {
+ /// If called, the command will not be executed directly, but with `sh`.
+ ///
+ /// This also allows to pass shell scripts as command, or use commands that contain arguments which are subsequently
+ /// parsed by `sh`.
+ pub fn with_shell(mut self) -> Self {
+ self.use_shell = self.command.to_str().map_or(true, |cmd| {
+ cmd.as_bytes().find_byteset(b"|&;<>()$`\\\"' \t\n*?[#~=%").is_some()
+ });
+ self
+ }
+
+ /// Unconditionally turn off using the shell when spawning the command.
+ /// Note that not using the shell is the default so an effective use of this method
+ /// is some time after [`with_shell()`][Prepare::with_shell()] was called.
+ pub fn without_shell(mut self) -> Self {
+ self.use_shell = false;
+ self
+ }
+
+ /// Configure the process to use `stdio` for _stdin.
+ pub fn stdin(mut self, stdio: Stdio) -> Self {
+ self.stdin = stdio;
+ self
+ }
+ /// Configure the process to use `stdio` for _stdout_.
+ pub fn stdout(mut self, stdio: Stdio) -> Self {
+ self.stdout = stdio;
+ self
+ }
+ /// Configure the process to use `stdio` for _stderr.
+ pub fn stderr(mut self, stdio: Stdio) -> Self {
+ self.stderr = stdio;
+ self
+ }
+
+ /// Add `arg` to the list of arguments to call the command with.
+ pub fn arg(mut self, arg: impl Into<OsString>) -> Self {
+ self.args.push(arg.into());
+ self
+ }
+
+ /// Add `args` to the list of arguments to call the command with.
+ pub fn args(mut self, args: impl IntoIterator<Item = impl Into<OsString>>) -> Self {
+ self.args
+ .append(&mut args.into_iter().map(Into::into).collect::<Vec<_>>());
+ self
+ }
+
+ /// Add `key` with `value` to the environment of the spawned command.
+ pub fn env(mut self, key: impl Into<OsString>, value: impl Into<OsString>) -> Self {
+ self.env.push((key.into(), value.into()));
+ self
+ }
+ }
+
+ /// Finalization
+ impl Prepare {
+ /// Spawn the command as configured.
+ pub fn spawn(self) -> std::io::Result<std::process::Child> {
+ Command::from(self).spawn()
+ }
+ }
+
+ impl From<Prepare> for Command {
+ fn from(mut prep: Prepare) -> Command {
+ let mut cmd = if prep.use_shell {
+ let mut cmd = Command::new(if cfg!(windows) { "sh" } else { "/bin/sh" });
+ cmd.arg("-c");
+ if !prep.args.is_empty() {
+ prep.command.push(" \"$@\"")
+ }
+ cmd.arg(prep.command);
+ cmd.arg("--");
+ cmd
+ } else {
+ Command::new(prep.command)
+ };
+ cmd.stdin(prep.stdin)
+ .stdout(prep.stdout)
+ .stderr(prep.stderr)
+ .envs(prep.env)
+ .args(prep.args);
+ cmd
+ }
+ }
+}
+
+/// Prepare `cmd` for [spawning][std::process::Command::spawn()] by configuring it with various builder methods.
+///
+/// Note that the default IO is configured for typical API usage, that is
+///
+/// - `stdin` is null to prevent blocking unexpectedly on consumption of stdin
+/// - `stdout` is captured for consumption by the caller
+/// - `stderr` is inherited to allow the command to provide context to the user
+pub fn prepare(cmd: impl Into<OsString>) -> Prepare {
+ Prepare {
+ command: cmd.into(),
+ stdin: std::process::Stdio::null(),
+ stdout: std::process::Stdio::piped(),
+ stderr: std::process::Stdio::inherit(),
+ args: Vec::new(),
+ env: Vec::new(),
+ use_shell: false,
+ }
+}
diff --git a/vendor/gix-command/tests/command.rs b/vendor/gix-command/tests/command.rs
new file mode 100644
index 000000000..cc1f5bda9
--- /dev/null
+++ b/vendor/gix-command/tests/command.rs
@@ -0,0 +1,116 @@
+use gix_testtools::Result;
+
+mod prepare {
+ fn quoted(input: &[&str]) -> String {
+ input.iter().map(|s| format!("\"{s}\"")).collect::<Vec<_>>().join(" ")
+ }
+ #[test]
+ fn single_and_multiple_arguments() {
+ let cmd = std::process::Command::from(gix_command::prepare("ls").arg("first").args(["second", "third"]));
+ assert_eq!(format!("{cmd:?}"), quoted(&["ls", "first", "second", "third"]));
+ }
+}
+
+mod spawn {
+ #[cfg(unix)]
+ use bstr::ByteSlice;
+
+ #[test]
+ #[cfg(unix)]
+ fn environment_variables_are_passed_one_by_one() -> crate::Result {
+ let out = gix_command::prepare("echo $FIRST $SECOND")
+ .env("FIRST", "first")
+ .env("SECOND", "second")
+ .with_shell()
+ .spawn()?
+ .wait_with_output()?;
+ assert_eq!(out.stdout.as_bstr(), "first second\n");
+ Ok(())
+ }
+
+ #[test]
+ #[cfg(unix)]
+ fn disallow_shell() -> crate::Result {
+ let out = gix_command::prepare("echo hi")
+ .with_shell()
+ .spawn()?
+ .wait_with_output()?;
+ assert_eq!(out.stdout.as_bstr(), "hi\n");
+ assert!(
+ gix_command::prepare("echo hi")
+ .with_shell()
+ .without_shell()
+ .spawn()
+ .is_err(),
+ "no command named 'echo hi' exists"
+ );
+ Ok(())
+ }
+
+ #[test]
+ fn direct_command_execution_searches_in_path() -> crate::Result {
+ assert!(gix_command::prepare(if cfg!(unix) { "ls" } else { "dir.exe" })
+ .spawn()?
+ .wait()?
+ .success());
+ Ok(())
+ }
+
+ #[cfg(unix)]
+ #[test]
+ fn direct_command_with_absolute_command_path() -> crate::Result {
+ assert!(gix_command::prepare("/bin/ls").spawn()?.wait()?.success());
+ Ok(())
+ }
+
+ mod with_shell {
+ use gix_testtools::bstr::ByteSlice;
+
+ #[test]
+ fn command_in_path_with_args() -> crate::Result {
+ assert!(gix_command::prepare(if cfg!(unix) { "ls -l" } else { "dir.exe -a" })
+ .with_shell()
+ .spawn()?
+ .wait()?
+ .success());
+ Ok(())
+ }
+
+ #[test]
+ fn sh_shell_specific_script_code() -> crate::Result {
+ assert!(gix_command::prepare(":;:;:").with_shell().spawn()?.wait()?.success());
+ Ok(())
+ }
+
+ #[test]
+ fn sh_shell_specific_script_code_with_single_extra_arg() -> crate::Result {
+ let out = gix_command::prepare("echo")
+ .with_shell()
+ .arg("1")
+ .spawn()?
+ .wait_with_output()?;
+ assert!(out.status.success());
+ #[cfg(not(windows))]
+ assert_eq!(out.stdout.as_bstr(), "1\n");
+ #[cfg(windows)]
+ assert_eq!(out.stdout.as_bstr(), "1\r\n");
+ Ok(())
+ }
+
+ #[test]
+ fn sh_shell_specific_script_code_with_multiple_extra_args() -> crate::Result {
+ let out = gix_command::prepare("echo")
+ .with_shell()
+ .arg("1")
+ .arg("2")
+ .spawn()?
+ .wait_with_output()?;
+ assert!(out.status.success());
+ #[cfg(not(windows))]
+ assert_eq!(out.stdout.as_bstr(), "1 2\n");
+ #[cfg(windows)]
+ assert_eq!(out.stdout.as_bstr(), "1 2\r\n");
+ Ok(())
+ }
+ }
+}