Skip to content

fix: Do not exclude executables in git walker#389

Merged
brianmcgee merged 3 commits intonumtide:mainfrom
akshaymankar:git-walker-executables
Aug 21, 2024
Merged

fix: Do not exclude executables in git walker#389
brianmcgee merged 3 commits intonumtide:mainfrom
akshaymankar:git-walker-executables

Conversation

@akshaymankar
Copy link
Contributor

Fixes #388

@brianmcgee
Copy link
Member

Thanks for the fix, I was just about to have a look at it myself.

The change makes sense to me, but it has me wondering why the TestGitWorktree in cli/format_test.go wasn't detecting this 🤔 We have a sample shellscript test/examples/shell/foo.sh which is marked as executable. There are 32 files in the example directory, but if we are skipping executable files it should have been detecting 31:

treefmt/cli/format_test.go

Lines 528 to 531 in 1427cc2

// add everything to the worktree
as.NoError(wt.AddGlob("."))
as.NoError(err)
run(32, 32, 32, 0)

@brianmcgee
Copy link
Member

Ok, I understand what was happening and am fixing the test.

Signed-off-by: Brian McGee <brian@bmcgee.ie>
Signed-off-by: Brian McGee <brian@bmcgee.ie>
@brianmcgee brianmcgee added the merge-queue merge after ci succeeds label Aug 21, 2024
@brianmcgee brianmcgee merged commit 96160ef into numtide:main Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-queue merge after ci succeeds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git walker ignores any files which don't have the mode 100644

2 participants