mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-06 03:22:59 +00:00
Reasoning: `jj` fails to push/fetch over ssh depending on the system. Issue #4979 lists over 20 related issues on this and proposes spawning a `git` subprocess for tasks related to the network (in fact, just push/fetch are enough). This PR implements this. Implementation Details: This PR implements shelling out to `git` via `std::process::Command`. There are 2 sharp edges with the patch: - it relies on having to parse out git errors to match the error codes (and parsing git2's errors in one particular instance to match the error behaviour). This seems mostly unavoidable - to ensure matching behaviour with git2, the tests are maintained across the two implementations. This is done using test_case, as with the rest of the codebase Testing: Run the rust tests: ``` $ cargo test ``` Build: ``` $ cargo build ``` Clone a private repo: ``` $ path/to/jj git clone --config='git.subprocess=true' <REPO_SSH_URL> ``` Create new commit and push ``` $ echo "TEST" > this_is_a_test_file.txt $ path/to/jj describe -m 'test commit' $ path/to/jj git push --config='git.subprocess=true' -b <branch> ``` Issues Closed With a grain of salt, but most of these problems should be fixed (or at least checked if they are fixed). They are the ones listed in #4979 . SSH: - https://github.com/jj-vcs/jj/issues/63 - https://github.com/jj-vcs/jj/issues/440 - https://github.com/jj-vcs/jj/issues/1455 - https://github.com/jj-vcs/jj/issues/1507 - https://github.com/jj-vcs/jj/issues/2931 - https://github.com/jj-vcs/jj/issues/2958 - https://github.com/jj-vcs/jj/issues/3322 - https://github.com/jj-vcs/jj/issues/4101 - https://github.com/jj-vcs/jj/issues/4333 - https://github.com/jj-vcs/jj/issues/4386 - https://github.com/jj-vcs/jj/issues/4488 - https://github.com/jj-vcs/jj/issues/4591 - https://github.com/jj-vcs/jj/issues/4802 - https://github.com/jj-vcs/jj/issues/4870 - https://github.com/jj-vcs/jj/issues/4937 - https://github.com/jj-vcs/jj/issues/4978 - https://github.com/jj-vcs/jj/issues/5120 - https://github.com/jj-vcs/jj/issues/5166 Clone/fetch/push/pull: - https://github.com/jj-vcs/jj/issues/360 - https://github.com/jj-vcs/jj/issues/1278 - https://github.com/jj-vcs/jj/issues/1957 - https://github.com/jj-vcs/jj/issues/2295 - https://github.com/jj-vcs/jj/issues/3851 - https://github.com/jj-vcs/jj/issues/4177 - https://github.com/jj-vcs/jj/issues/4682 - https://github.com/jj-vcs/jj/issues/4719 - https://github.com/jj-vcs/jj/issues/4889 - https://github.com/jj-vcs/jj/discussions/5147 - https://github.com/jj-vcs/jj/issues/5238 Notable Holdouts: - Interactive HTTP authentication (https://github.com/jj-vcs/jj/issues/401, https://github.com/jj-vcs/jj/issues/469) - libssh2-sys dependency on windows problem (can only be removed if/when we get rid of libgit2): https://github.com/jj-vcs/jj/issues/3984 |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
proc-macros | ||
src | ||
tests | ||
testutils | ||
Cargo.toml | ||
LICENSE |