Skip to content

Commit

Permalink
fix: Do not exclude executables in git walker
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaymankar committed Aug 21, 2024
1 parent 1427cc2 commit a581352
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion walk/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit a581352

Please sign in to comment.