Skip to content

Commit 69224e3

Browse files
committed
remove hacks
1 parent f9ff366 commit 69224e3

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

git2-hooks/src/hookspath.rs

-12
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,6 @@ impl HookPaths {
154154
let mut stdout =
155155
String::from_utf8_lossy(&output.stdout).to_string();
156156

157-
if cfg!(windows) {
158-
const ANSI_CLEAR: &str = "\x1B[H\x1B[2J\x1B[3J";
159-
160-
for text in [&mut stderr, &mut stdout] {
161-
if let Some(trimmed) =
162-
text.strip_suffix(ANSI_CLEAR)
163-
{
164-
text.truncate(trimmed.len());
165-
}
166-
}
167-
}
168-
169157
Ok(HookResult::RunNotSuccessful {
170158
code: output.status.code(),
171159
stdout,

git2-hooks/src/lib.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,7 @@ exit 1
428428

429429
#[test]
430430
fn test_env_containing_path() {
431-
const PATH_EXPORT: &str = if cfg!(windows) {
432-
"declare -x PATH="
433-
} else {
434-
"export PATH"
435-
};
431+
const PATH_EXPORT: &str = "export PATH";
436432

437433
let (_td, repo) = repo_init();
438434

0 commit comments

Comments
 (0)