Unverified Commit a55aee61 authored by Marcin Serwin's avatar Marcin Serwin Committed by GitHub
Browse files

gitu: patch unit tests (#486724)

parents c25d7ede 2abfc750
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -20,6 +20,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
    hash = "sha256-JNa9foW5z0NrXk5r/Oep20+u7YRhkzMIZQPHlZVifGI=";
  };

  patches = [
    ./unit-tests-compile.patch
  ];

  cargoHash = "sha256-mQ5xXYVmadmNx57nnJGICZ2dhll+V3PkYK+hwTTfdVE=";

  nativeBuildInputs = [
+31 −0
Original line number Diff line number Diff line
diff --git i/src/git/parse/status/mod.rs w/src/git/parse/status/mod.rs
index 5595ca1..8929d79 100644
--- i/src/git/parse/status/mod.rs
+++ w/src/git/parse/status/mod.rs
@@ -703,10 +703,12 @@ R  old.rs -> new.rs
             for c2 in &status_chars {
                 input.push(*c1);
                 input.push(*c2);
+                let c1_str = c1.to_string();
+                let c2_str = c2.to_string();
                 input.push_str(&format!(
                     " file_{}_{}.txt\n",
-                    if *c1 == ' ' { "space" } else { &c1.to_string() },
-                    if *c2 == ' ' { "space" } else { &c2.to_string() }
+                    if *c1 == ' ' { "space" } else { &c1_str },
+                    if *c2 == ' ' { "space" } else { &c2_str }
                 ));
                 count += 1;
             }
diff --git i/src/tests/remote.rs w/src/tests/remote.rs
index 7a81a50..0ac14f5 100644
--- i/src/tests/remote.rs
+++ w/src/tests/remote.rs
@@ -1,6 +1,6 @@
 use git2::{Buf, Error, Repository};
 
-use crate::{git::remote::*, repo_setup_clone, setup_clone, tests::helpers::RepoTestContext};
+use crate::{git::remote::*, repo_setup_clone, tests::helpers::RepoTestContext};
 
 use super::*;