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:343–387  ·  view source on GitHub ↗
(path: &str)

Source from the content-addressed store, hash-verified

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