Skip to content

Commit

Permalink
fix(core): support git 2.32.0
Browse files Browse the repository at this point in the history
In a recent minor version update of Git, either the `--cache` or the
`--other` flag has to be passed when using the `--ignore` flag.

The `--cache` flag (on by default) is now explicitly passed in the
relevant calls to `git ls-files`.
  • Loading branch information
thsig committed Jun 16, 2021
1 parent 852db05 commit 32cb2d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/vcs/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class GitHandler extends VcsHandler {
// to make sure the path handling is consistent with normal POSIX-style globs used generally by Garden.
// Note: We unfortunately can't exclude at this level because it simply doesn't work in git, for reasons unknown.
const patterns = [...(include || []).map((p) => ":(glob)" + p)]
const lsFilesCommonArgs = ["--exclude", this.gardenDirPath]
const lsFilesCommonArgs = ["--cached", "--exclude", this.gardenDirPath]

// List tracked but ignored files (we currently exclude those as well, so we need to query that specially)
// TODO: change in 0.13 to no longer exclude these
Expand Down

0 comments on commit 32cb2d7

Please sign in to comment.