Skip to content

Commit

Permalink
cli: add libgit2 info to version --details
Browse files Browse the repository at this point in the history
Hopefully this paper trail can help us in the future.
  • Loading branch information
thoughtpolice committed May 14, 2024
1 parent 2e48fc9 commit 3e45560
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cli/src/commands/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,21 @@ Report bugs: <https://github.com/martinvonz/jj/issues>
"Release: {}",
option_env!("JJ_RELEASE_BUILD").is_some()
)?;

let git2_ver = git2::Version::get();
let (git2_maj, git2_min, git2_patch) = git2_ver.libgit2_version();
writeln!(
ui.stdout(),
"libgit2: ver={}.{}.{}, rs={}, vendored={}, tls={}, libssh2={}, nsec={}",
git2_maj,
git2_min,
git2_patch,
git2_ver.crate_version(),
git2_ver.vendored(),
git2_ver.https(),
git2_ver.ssh(),
git2_ver.nsec(),
)?;
}
Ok(())
}

0 comments on commit 3e45560

Please sign in to comment.