[!umask:022] skip

# test chezmoi diff --exclude
chezmoi diff --exclude=scripts
[!windows] cmp stdout golden/diff-no-scripts.diff
[windows] cmp stdout golden/diff-no-scripts-windows.diff

# test that chezmoi diff respects the diff.exclude configuration variable
chezmoi diff
[!windows] cmp stdout golden/diff.diff
[windows] cmp stdout golden/diff-windows.diff
mkdir $CHEZMOICONFIGDIR
cp golden/chezmoi.toml $CHEZMOICONFIGDIR
chezmoi diff
[!windows] cmp stdout golden/diff-no-scripts.diff
[windows] cmp stdout golden/diff-no-scripts-windows.diff

-- home/user/.local/share/chezmoi/dot_file --
# contents of .file
-- home/user/.local/share/chezmoi/run_script.sh --
#!/bin/sh

echo $*
-- golden/chezmoi.toml --
[diff]
    exclude = ["scripts"]
-- golden/diff.diff --
diff --git a/.file b/.file
new file mode 100644
index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362
--- /dev/null
+++ b/.file
@@ -0,0 +1 @@
+# contents of .file
diff --git a/script.sh b/script.sh
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3747a7ba08ee591c41b7c518e430d2802137eac4 100755
--- a/script.sh
+++ b/script.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo $*
-- golden/diff-windows.diff --
diff --git a/.file b/.file
new file mode 100666
index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362
--- /dev/null
+++ b/.file
@@ -0,0 +1 @@
+# contents of .file
diff --git a/script.sh b/script.sh
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3747a7ba08ee591c41b7c518e430d2802137eac4 100755
--- a/script.sh
+++ b/script.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo $*
-- golden/diff-no-scripts.diff --
diff --git a/.file b/.file
new file mode 100644
index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362
--- /dev/null
+++ b/.file
@@ -0,0 +1 @@
+# contents of .file
-- golden/diff-no-scripts-windows.diff --
diff --git a/.file b/.file
new file mode 100666
index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362
--- /dev/null
+++ b/.file
@@ -0,0 +1 @@
+# contents of .file
