From a5813527bb1405fd29774cb8fe82b939da679bee Mon Sep 17 00:00:00 2001 From: Akshay Mankar Date: Wed, 21 Aug 2024 10:14:17 +0200 Subject: [PATCH] fix: Do not exclude executables in git walker --- walk/git.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/walk/git.go b/walk/git.go index f0c5b52e..08465a80 100644 --- a/walk/git.go +++ b/walk/git.go @@ -10,6 +10,7 @@ import ( "github.com/charmbracelet/log" "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/plumbing/filemode" ) type gitWalker struct { @@ -52,7 +53,7 @@ func (g gitWalker) Walk(ctx context.Context, fn WalkFunc) error { return ctx.Err() default: // we only want regular files, not directories or symlinks - if !entry.Mode.IsRegular() { + if entry.Mode == filemode.Dir || entry.Mode == filemode.Symlink { continue }