Skip to content

Commit ca22436

Browse files
committed
git: enable libgit2's OpenSSH feature
1 parent 0388334 commit ca22436

File tree

4 files changed

+9
-22
lines changed

4 files changed

+9
-22
lines changed

Cargo.lock

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ dirs = "5.0.1"
4747
either = "1.13.0"
4848
esl01-renderdag = "0.3.0"
4949
futures = "0.3.30"
50-
git2 = { git = "https://github.com/bnjmnt4n/git2-rs.git", rev = "8fd23a45f" }
50+
git2 = { git = "https://github.com/bnjmnt4n/git2-rs.git", rev = "8fd23a45f", default-features = false, features = [
51+
"https",
52+
"ssh-openssh",
53+
"vendored-libgit2",
54+
] }
5155
gix = { version = "0.63.0", default-features = false, features = [
5256
"index",
5357
"max-performance-safe",

cli/src/commands/git/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ fn map_git_error(err: git2::Error) -> CommandError {
8080
successfully load certificates. Try setting it to the path of a directory that \
8181
contains a `.ssh` directory."
8282
} else {
83-
"Jujutsu uses libssh2, which doesn't respect ~/.ssh/config. Does `ssh -F \
84-
/dev/null` to the host work?"
83+
"There was an error creating an SSH connection. Does `ssh -F /dev/null` to the \
84+
host work?"
8585
};
8686

8787
user_error_with_hint(err, hint)

flake.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,10 @@
9999
openssh
100100
] ++ linuxNativeDeps;
101101
buildInputs = with pkgs; [
102-
openssl zstd libgit2 libssh2
102+
openssl zstd libgit2 openssh
103103
] ++ darwinDeps;
104104

105105
ZSTD_SYS_USE_PKG_CONFIG = "1";
106-
LIBSSH2_SYS_USE_PKG_CONFIG = "1";
107106
RUSTFLAGS = pkgs.lib.optionalString pkgs.stdenv.isLinux "-C link-arg=-fuse-ld=mold";
108107
NIX_JJ_GIT_HASH = self.rev or "";
109108
CARGO_INCREMENTAL = "0";
@@ -153,7 +152,7 @@
153152
ourRustVersion
154153

155154
# Foreign dependencies
156-
openssl zstd libgit2 libssh2
155+
openssl zstd libgit2
157156
pkg-config
158157

159158
# Additional tools recommended by contributing.md
@@ -179,7 +178,6 @@
179178
shellHook = ''
180179
export RUST_BACKTRACE=1
181180
export ZSTD_SYS_USE_PKG_CONFIG=1
182-
export LIBSSH2_SYS_USE_PKG_CONFIG=1
183181
184182
export RUSTFLAGS="-Zthreads=0 ${rustLinkFlagsString}"
185183
'';

0 commit comments

Comments
 (0)