Skip to main content

Rename this function for clarity

ID
8e0e5d5
date
2025-08-16 22:08:08+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
93da18e
message
Rename this function for clarity
changed files
1 file, 2 additions, 2 deletions

Changed files

src/can_be_deleted.rs (5950) → src/can_be_deleted.rs (5958)

diff --git a/src/can_be_deleted.rs b/src/can_be_deleted.rs
index 23e1f10..b0ac862 100644
--- a/src/can_be_deleted.rs
+++ b/src/can_be_deleted.rs
@@ -21,7 +21,7 @@ fn get_names_in_directory(dir: &Path) -> io::Result<HashSet<OsString>> {
 
 /// Returns True if this path any ancestor is a `.git` folder,
 /// False otherwise.
-fn is_in_git_folder(path: &Path) -> bool {
+fn is_in_git_repository(path: &Path) -> bool {
     path.ancestors()
         .any(|ancestor| ancestor.file_name().map_or(false, |name| name == ".git"))
 }
@@ -51,7 +51,7 @@ pub fn can_be_deleted(path: &Path) -> bool {
     //     fatal: not a git repository (or any of the parent directories): .git
     //
     // Skipping these folders is fine.
-    if is_in_git_folder(path) {
+    if is_in_git_repository(path) {
         return false;
     }