|
1 |
| -use std::{collections::HashMap, str::FromStr}; |
| 1 | +#![cfg(feature = "git2")] |
| 2 | +use std::str::FromStr; |
2 | 3 |
|
3 | 4 | use globwalk::ValidatedGlob;
|
4 | 5 | use tracing::debug;
|
5 |
| -use turbopath::{AbsoluteSystemPath, AnchoredSystemPath, PathError, RelativeUnixPathBuf}; |
| 6 | +use turbopath::{AbsoluteSystemPath, AnchoredSystemPath, PathError}; |
6 | 7 | use turborepo_telemetry::events::task::{FileHashMethod, PackageTaskEventBuilder};
|
7 | 8 |
|
8 |
| -use crate::{hash_object::hash_objects, Error, Git, SCM}; |
9 |
| - |
10 |
| -pub type GitHashes = HashMap<RelativeUnixPathBuf, String>; |
| 9 | +#[cfg(feature = "git2")] |
| 10 | +use crate::hash_object::hash_objects; |
| 11 | +use crate::{Error, Git, GitHashes, SCM}; |
11 | 12 |
|
12 | 13 | pub const INPUT_INCLUDE_DEFAULT_FILES: &str = "$TURBO_DEFAULT$";
|
13 | 14 |
|
@@ -291,9 +292,9 @@ impl Git {
|
291 | 292 |
|
292 | 293 | #[cfg(test)]
|
293 | 294 | mod tests {
|
294 |
| - use std::{assert_matches::assert_matches, process::Command}; |
| 295 | + use std::{assert_matches::assert_matches, collections::HashMap, process::Command}; |
295 | 296 |
|
296 |
| - use turbopath::{AbsoluteSystemPathBuf, AnchoredSystemPathBuf}; |
| 297 | + use turbopath::{AbsoluteSystemPathBuf, AnchoredSystemPathBuf, RelativeUnixPathBuf}; |
297 | 298 |
|
298 | 299 | use super::*;
|
299 | 300 | use crate::manual::get_package_file_hashes_without_git;
|
|
0 commit comments