Fix path to repository-wide exclude file (#1837)

## 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.
This commit is contained in:
Pieter Noordhuis 2024-10-18 17:46:39 +02:00 committed by GitHub
parent c9770503f8
commit eefda8c198
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -252,8 +252,8 @@ func NewRepository(path vfs.Path) (*Repository, error) {
newStringIgnoreRules([]string{ newStringIgnoreRules([]string{
".git", ".git",
}), }),
// Load repository-wide excludes file. // Load repository-wide exclude file.
repo.newIgnoreFile(".git/info/excludes"), repo.newIgnoreFile(".git/info/exclude"),
// Load root gitignore file. // Load root gitignore file.
repo.newIgnoreFile(".gitignore"), repo.newIgnoreFile(".gitignore"),
} }