Skip to content

Commit 3b15b29

Browse files
committed
Bump version to v0.7.6
1 parent 88bfcce commit 3b15b29

File tree

3 files changed

+30
-20
lines changed

3 files changed

+30
-20
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "glimpse"
3-
version = "0.7.5"
3+
version = "0.7.6"
44
edition = "2021"
55
description = "A blazingly fast tool for peeking at codebases. Perfect for loading your codebase into an LLM's context."
66
license = "MIT"

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
{
2626
packages.default = pkgs.rustPlatform.buildRustPackage {
2727
pname = "glimpse";
28-
version = "0.7.5";
28+
version = "0.7.6";
2929

3030
src = ./.;
3131

src/analyzer.rs

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ pub fn process_entries(args: &Cli) -> Result<Vec<FileEntry>> {
9090
.git_ignore(!args.no_ignore)
9191
.ignore(!args.no_ignore);
9292

93-
let mut override_builder = OverrideBuilder::new(path);
93+
let mut override_builder = OverrideBuilder::new(path);
94+
95+
override_builder.add("!**/GLIMPSE.md")?;
96+
override_builder.add("!**/.glimpse")?;
9497

9598
// Handle include patterns first (positive patterns)
9699
if let Some(ref includes) = args.include {
97100
for pattern in includes {
98101
// Include patterns are positive patterns (no ! prefix)
99102
if let Err(e) = override_builder.add(pattern) {
100-
eprintln!(
101-
"Warning: Invalid include pattern '{}': {}",
102-
pattern, e
103-
);
103+
eprintln!("Warning: Invalid include pattern '{}': {}", pattern, e);
104104
}
105105
}
106106
}
@@ -188,18 +188,14 @@ pub fn process_entries(args: &Cli) -> Result<Vec<FileEntry>> {
188188
{
189189
// Need to check includes and excludes even for single files explicitly passed
190190
let mut excluded = false;
191-
let mut override_builder =
192-
OverrideBuilder::new(path.parent().unwrap_or(path)); // Base relative to parent
191+
let mut override_builder = OverrideBuilder::new(path.parent().unwrap_or(path)); // Base relative to parent
193192

194193
// Handle include patterns first (positive patterns)
195194
if let Some(ref includes) = args.include {
196195
for pattern in includes {
197196
// Include patterns are positive patterns (no ! prefix)
198197
if let Err(e) = override_builder.add(pattern) {
199-
eprintln!(
200-
"Warning: Invalid include pattern '{}': {}",
201-
pattern, e
202-
);
198+
eprintln!("Warning: Invalid include pattern '{}': {}", pattern, e);
203199
}
204200
}
205201
}
@@ -461,9 +457,9 @@ mod tests {
461457
for entry in &entries {
462458
let path_str = entry.path.to_string_lossy();
463459
assert!(
464-
!path_str.contains("node_modules") &&
465-
!path_str.contains("target") &&
466-
!path_str.contains(".git"),
460+
!path_str.contains("node_modules")
461+
&& !path_str.contains("target")
462+
&& !path_str.contains(".git"),
467463
"Found file from excluded directory: {:?}",
468464
entry.path
469465
);
@@ -499,7 +495,10 @@ mod tests {
499495
let entries = process_entries(&cli)?;
500496

501497
// Verify only .rs and .py files were processed
502-
assert!(!entries.is_empty(), "Should have found some .rs and .py files");
498+
assert!(
499+
!entries.is_empty(),
500+
"Should have found some .rs and .py files"
501+
);
503502
for entry in &entries {
504503
let ext = entry.path.extension().and_then(|ext| ext.to_str());
505504
assert!(
@@ -541,15 +540,22 @@ mod tests {
541540
}
542541

543542
// Should find 3 .rs files (main.rs, lib.rs, code.rs) but not test.rs
544-
assert_eq!(entries.len(), 3, "Should find exactly 3 .rs files (excluding test.rs)");
543+
assert_eq!(
544+
entries.len(),
545+
3,
546+
"Should find exactly 3 .rs files (excluding test.rs)"
547+
);
545548

546549
// Test including multiple file types but excluding a directory
547550
cli.include = Some(vec!["**/*.rs".to_string(), "**/*.py".to_string()]);
548551
cli.exclude = Some(vec![Exclude::Pattern("**/nested/**".to_string())]);
549552
let entries = process_entries(&cli)?;
550553

551554
// Verify only .rs and .py files were processed, but nested directory was excluded
552-
assert!(!entries.is_empty(), "Should have found some .rs and .py files");
555+
assert!(
556+
!entries.is_empty(),
557+
"Should have found some .rs and .py files"
558+
);
553559
for entry in &entries {
554560
let ext = entry.path.extension().and_then(|ext| ext.to_str());
555561
assert!(
@@ -565,7 +571,11 @@ mod tests {
565571
}
566572

567573
// Should find 3 .rs files (main.rs, lib.rs, test.rs) but not code.rs or script.py from nested
568-
assert_eq!(entries.len(), 3, "Should find exactly 3 files (excluding nested directory)");
574+
assert_eq!(
575+
entries.len(),
576+
3,
577+
"Should find exactly 3 files (excluding nested directory)"
578+
);
569579

570580
Ok(())
571581
}

0 commit comments

Comments
 (0)