Skip to content

Commit

Permalink
ignore .git
Browse files Browse the repository at this point in the history
  • Loading branch information
figsoda committed Jul 31, 2023
1 parent 4b54af2 commit 090ca07
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Expand Up @@ -104,7 +104,11 @@ fn main() -> Result<()> {
}

fn walk(mut f: impl FnMut(&Path) -> Result<()>) -> Result<()> {
for entry in WalkBuilder::new(".").hidden(false).build() {
for entry in WalkBuilder::new(".")
.hidden(false)
.filter_entry(|entry| entry.depth() != 1 || entry.file_name() != ".git")
.build()
{
let path = entry.wrap_err("failed to read entry")?.into_path();
let path = path.strip_prefix(".")?;
if path.is_file() && matches!(path.file_name(), Some(name) if name != ".submitUser") {
Expand Down

0 comments on commit 090ca07

Please sign in to comment.