1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
//! # LeChange Core
//!
//! Ultra-fast Git change detection library with zero-cost abstractions.
//!
//! This library provides high-performance git diff operations using:
//! - **GATs (Generic Associated Types)** for zero-cost async
//! - **Lifetimes over Arc** for zero-copy string handling
//! - **String interning** for path deduplication
//! - **Rayon** for CPU-bound parallel processing
//! - **Tokio** for async I/O operations
//!
//! ## Example
//!
//! ```no_run
//! use lechange_core::{InputConfig, detect_changes};
//! use std::borrow::Cow;
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let config = InputConfig {
//! base_sha: Some(Cow::Borrowed("HEAD^")),
//! sha: Some(Cow::Borrowed("HEAD")),
//! ..Default::default()
//! };
//!
//! let result = detect_changes(config).await?;
//! println!("Changed files: {}", result.all_files.len());
//! # Ok(())
//! # }
//! ```
pub use ;
pub use StringInterner;
pub use ;
/// Detect changed files between two git references
///
/// This is the main entry point for the library. It handles:
/// - SHA resolution
/// - Diff computation
/// - Pattern filtering
/// - Submodule processing
/// - Symlink detection
/// - Workflow intelligence
///
/// Returns a `ProcessedResult` with index-based partitioning for both
/// filtered and unfiltered file sets.
///
/// # Example
///
/// ```no_run
/// use lechange_core::{InputConfig, detect_changes};
/// use std::borrow::Cow;
///
/// # async fn example() -> lechange_core::Result<()> {
/// let config = InputConfig {
/// base_sha: Some(Cow::Borrowed("main")),
/// sha: Some(Cow::Borrowed("HEAD")),
/// ..Default::default()
/// };
///
/// let result = detect_changes(config).await?;
/// println!("Files changed: {}", result.all_files.len());
/// # Ok(())
/// # }
/// ```
pub async
/// Synchronous variant of `detect_changes`
///
/// This creates a new Tokio runtime and blocks on the async version.
/// Prefer the async version if you're already in an async context.