mirror of https://github.com/databricks/cli.git
a7bf7ba6c5
This commit changes the code in repository.go to lazily load gitignore files as opposed to the previous eager approach. This means that the signature of the `Ignore` function family has changed to return `(bool, error)`. This lazy approach fits better when other code is responsible for recursively walking the file tree, because we never know up front which gitignore files need to be loaded to compute the ignores. It also means we no longer have to "prime" the `Repository` instance with a particular directory we're interested in and rather let calls to `Ignore` load whatever is needed. The fileset wrapper under `git/` internally taints all gitignore objects to force a call to [os.Stat] followed by a reload if they have changed, before calling into the [fileset.FileSet] functions for recursively listing files. |
||
---|---|---|
.. | ||
testdata | ||
README.md | ||
config.go | ||
config_test.go | ||
environment.go | ||
environment_test.go | ||
flavor.go | ||
project.go | ||
project_test.go | ||
root.go | ||
root_test.go |
README.md
Project Configuration
Good implicit defaults is better than explicit complex configuration.
Regardless of current working directory, bricks
finds project root with databricks.yml
file up the directory tree. Technically, there might be couple of different Databricks Projects in the same Git repository, but the recommended scenario is to have just one databricks.yml
in the root of Git repo.