MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / is_generated_diff_skip_path

Function is_generated_diff_skip_path

atomic-cli/src/commands/git/parallel.rs:351–395  ·  view source on GitHub ↗
(path: &str)

Source from the content-addressed store, hash-verified

349}
350
351fn is_generated_diff_skip_path(path: &str) -> bool {
352 let normalized = path.replace('\\', "/");
353 let name = Path::new(path)
354 .file_name()
355 .and_then(|s| s.to_str())
356 .unwrap_or(path);
357 let lower_name = name.to_ascii_lowercase();
358 let lower_path = normalized.to_ascii_lowercase();
359
360 lower_name.ends_with(".lock")
361 || lower_name.ends_with(".sum")
362 || lower_name.ends_with(".min.css")
363 || lower_name.ends_with(".min.js")
364 || lower_name.ends_with(".map")
365 || matches!(
366 lower_name.as_str(),
367 "package-lock.json" | "yarn.lock" | "pnpm-lock.yaml" | "npm-shrinkwrap.json"
368 )
369 || matches!(
370 Path::new(&lower_name)
371 .extension()
372 .and_then(|ext| ext.to_str()),
373 Some(
374 "png"
375 | "jpg"
376 | "jpeg"
377 | "gif"
378 | "webp"
379 | "ico"
380 | "bmp"
381 | "tiff"
382 | "woff"
383 | "woff2"
384 | "ttf"
385 | "eot"
386 | "otf"
387 | "pdf"
388 | "zip"
389 | "gz"
390 | "tgz"
391 )
392 )
393 || lower_path.ends_with("/website/source/stylesheets/main.css")
394 || lower_path == "website/source/stylesheets/main.css"
395}
396
397fn count_line_units(content: &[u8]) -> usize {
398 if content.is_empty() {

Callers 5

build_graph_first_changeFunction · 0.85
write_commitMethod · 0.85

Calls 2

file_nameMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected