mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
Enhance syncback functionality to manage .gitkeep files
- Updated the syncback loop to skip hidden files/directories, with an exception for .gitkeep, which is necessary for directory management. - Added comprehensive tests to ensure proper cleanup of stale .gitkeep files in various scenarios, including non-empty directories and init-style projects.
This commit is contained in:
parent
9b832c4637
commit
7172ae2d09
2 changed files with 120 additions and 2 deletions
|
|
@ -381,9 +381,11 @@ pub fn syncback_loop_with_stats(
|
|||
continue;
|
||||
}
|
||||
|
||||
// Skip hidden files/directories (starting with .)
|
||||
// Skip hidden files/directories (starting with .), except
|
||||
// .gitkeep which is managed by Rojo and must be tracked for
|
||||
// cleanup when directories are no longer empty.
|
||||
if let Some(name) = path.file_name().and_then(|n| n.to_str()) {
|
||||
if name.starts_with('.') {
|
||||
if name.starts_with('.') && name != ".gitkeep" {
|
||||
log::trace!("Skipping {} (hidden)", path.display());
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue