mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
* feat(deps): bump github.com/muesli/gitcha from 0.2.0 to 0.3.0 * fix: --all bypass .gitignore rules (#285) * Update ui/ui.go --------- Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
8e51396575
commit
08c564c858
3 changed files with 11 additions and 5 deletions
2
go.mod
2
go.mod
|
@ -15,7 +15,7 @@ require (
|
|||
github.com/dustin/go-humanize v1.0.1
|
||||
github.com/mattn/go-runewidth v0.0.15
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/muesli/gitcha v0.2.0
|
||||
github.com/muesli/gitcha v0.3.0
|
||||
github.com/muesli/go-app-paths v0.2.2
|
||||
github.com/muesli/reflow v0.3.0
|
||||
github.com/muesli/termenv v0.15.2
|
||||
|
|
3
go.sum
3
go.sum
|
@ -214,6 +214,9 @@ github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELU
|
|||
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
|
||||
github.com/muesli/gitcha v0.2.0 h1:+wOgT2dI9s2Tznj1t1rb/qkK5e0cb6qD8c4IX2TR/YY=
|
||||
github.com/muesli/gitcha v0.2.0/go.mod h1:Ri8m9TZS4+ORG4JVmVKUQcWZuxDvUW3UKxMdQfzG2zI=
|
||||
github.com/muesli/gitcha v0.3.0 h1:+PJkVKrDXVB0VgRn/yVx2CqSVSDGMSepzvohsCrPYtQ=
|
||||
github.com/muesli/gitcha v0.3.0/go.mod h1:vX3jFL+XcEUq1uY74RCjLSZfAV+ZuvLg70/NGPdXn84=
|
||||
github.com/muesli/go-app-paths v0.2.1/go.mod h1:SxS3Umca63pcFcLtbjVb+J0oD7cl4ixQWoBKhGEtEho=
|
||||
github.com/muesli/go-app-paths v0.2.2 h1:NqG4EEZwNIhBq/pREgfBmgDmt3h1Smr1MjZiXbpZUnI=
|
||||
github.com/muesli/go-app-paths v0.2.2/go.mod h1:SxS3Umca63pcFcLtbjVb+J0oD7cl4ixQWoBKhGEtEho=
|
||||
github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
|
||||
|
|
11
ui/ui.go
11
ui/ui.go
|
@ -331,12 +331,15 @@ func findLocalFiles(m commonModel) tea.Cmd {
|
|||
}
|
||||
|
||||
log.Debug("local directory is", "cwd", cwd)
|
||||
var ignore []string
|
||||
if !m.cfg.ShowAllFiles {
|
||||
ignore = ignorePatterns(m)
|
||||
|
||||
// Switch between FindFiles and FindAllFiles to bypass .gitignore rules
|
||||
var ch chan gitcha.SearchResult
|
||||
if m.cfg.ShowAllFiles {
|
||||
ch, err = gitcha.FindAllFilesExcept(cwd, markdownExtensions, nil)
|
||||
} else {
|
||||
ch, err = gitcha.FindFilesExcept(cwd, markdownExtensions, ignorePatterns(m))
|
||||
}
|
||||
|
||||
ch, err := gitcha.FindFilesExcept(cwd, markdownExtensions, ignore)
|
||||
if err != nil {
|
||||
log.Error("error finding local files", "error", err)
|
||||
return errMsg{err}
|
||||
|
|
Loading…
Reference in a new issue