From ca2df272594a7b055c740ccda0b9c31b3b7e43cc Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 25 Feb 2026 12:27:56 +0000 Subject: fix: update hardcoded libgit2 version strings in tests to 1.9.2 The Nix environment provides libgit2 1.9.2 via nixpkgs, which libgit2-sys picks up at build time instead of using its bundled version. This caused test assertions that hardcode the libgit2 version string (appended by libgit2 to patch output) to fail after commit 319bb7f added new Cargo dependencies, though the exact mechanism by which those dependencies triggered the switch from the bundled 1.9.1 to the system 1.9.2 remains unclear. Also bump git2 from 0.20.2 to 0.20.4 in both Cargo.toml files so the bundled libgit2-sys version (0.18.3+1.9.2) properly aligns with the 1.9.2 version in use. --- Cargo.toml | 4 ++-- src/lib/git/mod.rs | 4 ++-- src/lib/mbox_parser.rs | 4 ++-- test_utils/Cargo.toml | 2 +- tests/ngit_send.rs | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 721893e..4c42d0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ngit" -version = "2.2.0" +version = "2.2.1" edition = "2021" description = "nostr plugin for git" authors = ["DanConwayDev "] @@ -23,7 +23,7 @@ console = "0.16.0" dialoguer = "0.12.0" directories = "6.0.0" futures = "0.3.31" -git2 = "0.20.2" +git2 = "0.20.4" indicatif = "0.18.0" mailparse = "0.16.1" nostr = { version = "0.44.1", features = ["nip49"] } diff --git a/src/lib/git/mod.rs b/src/lib/git/mod.rs index dc84ee3..23fa5f0 100644 --- a/src/lib/git/mod.rs +++ b/src/lib/git/mod.rs @@ -1477,7 +1477,7 @@ mod tests { +some content1\n\\ \ No newline at end of file\n\ --\n\ - libgit2 1.9.1\n\ + libgit2 1.9.2\n\ \n\ ", git_repo.make_patch_from_commit(&oid_to_sha1(&oid), &None)?, @@ -1513,7 +1513,7 @@ mod tests { +some content1\n\\ \ No newline at end of file\n\ --\n\ - libgit2 1.9.1\n\ + libgit2 1.9.2\n\ \n\ ", git_repo.make_patch_from_commit(&oid_to_sha1(&oid), &Some((3, 5)))?, diff --git a/src/lib/mbox_parser.rs b/src/lib/mbox_parser.rs index 48190ba..f3815f9 100644 --- a/src/lib/mbox_parser.rs +++ b/src/lib/mbox_parser.rs @@ -333,7 +333,7 @@ index 0000000..a66525d +some content1 \\ No newline at end of file -- -libgit2 1.9.1 +libgit2 1.9.2 " .to_string() @@ -531,7 +531,7 @@ Subject: [PATCH] test This is the body. -- -libgit2 1.9.1 +libgit2 1.9.2 diff --git a/file.txt b/file.txt "; diff --git a/test_utils/Cargo.toml b/test_utils/Cargo.toml index e7f5e05..68eba20 100644 --- a/test_utils/Cargo.toml +++ b/test_utils/Cargo.toml @@ -9,7 +9,7 @@ assert_cmd = "2.0.17" dialoguer = "0.12.0" directories = "6.0.0" futures = "0.3.31" -git2 = "0.20.2" +git2 = "0.20.4" nostr = "0.44.1" nostr-database = "0.44.0" nostr-lmdb = "0.44.0" diff --git a/tests/ngit_send.rs b/tests/ngit_send.rs index 67b2209..9e66051 100644 --- a/tests/ngit_send.rs +++ b/tests/ngit_send.rs @@ -421,7 +421,7 @@ mod when_cover_letter_details_specified_with_range_of_head_2_sends_cover_letter_ +some content\n\\ \ No newline at end of file\n\ --\n\ - libgit2 1.9.1\n\ + libgit2 1.9.2\n\ \n\ ", ); @@ -447,7 +447,7 @@ mod when_cover_letter_details_specified_with_range_of_head_2_sends_cover_letter_ +some content\n\\ \ No newline at end of file\n\ --\n\ - libgit2 1.9.1\n\ + libgit2 1.9.2\n\ \n\ ", ); -- cgit v1.2.3