Skip to content

Commit

Permalink
Fix path to repository-wide exclude file (#1837)
Browse files Browse the repository at this point in the history
## Changes

This file is at `info/exclude`, and not `info/excludes`.

Also see https://git-scm.com/docs/gitignore.

## Tests

Manually confirmed that these ignore patterns are now picked up. I
created a repository with a pattern in this file and ran `sync` to
confirm it ignores files matching the pattern.
  • Loading branch information
pietern authored Oct 18, 2024
1 parent c977050 commit eefda8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/git/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ func NewRepository(path vfs.Path) (*Repository, error) {
newStringIgnoreRules([]string{
".git",
}),
// Load repository-wide excludes file.
repo.newIgnoreFile(".git/info/excludes"),
// Load repository-wide exclude file.
repo.newIgnoreFile(".git/info/exclude"),
// Load root gitignore file.
repo.newIgnoreFile(".gitignore"),
}
Expand Down

0 comments on commit eefda8c

Please sign in to comment.