added: ignore objects mentioned in .databricksignore

this is a quick fix to #1192
This commit is contained in:
Subhrodip Mohanta 2024-02-09 15:50:36 +01:00
parent bc30c9ed4a
commit ec4743e879
No known key found for this signature in database
GPG Key ID: 16A77C13E41591BA
1 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import (
) )
const gitIgnoreFileName = ".gitignore" const gitIgnoreFileName = ".gitignore"
const dataBricksIgnoreFileName = ".databricksignore"
var GitDirectoryName = ".git" var GitDirectoryName = ".git"
@ -235,7 +236,9 @@ func NewRepository(path string) (*Repository, error) {
// Load repository-wide excludes file. // Load repository-wide excludes file.
repo.newIgnoreFile(".git/info/excludes"), repo.newIgnoreFile(".git/info/excludes"),
// Load root gitignore file. // Load root gitignore file.
repo.newIgnoreFile(".gitignore"), repo.newIgnoreFile(gitIgnoreFileName),
// Load root databricksignore file.
repo.newIgnoreFile(dataBricksIgnoreFileName),
} }
return repo, nil return repo, nil