Ignore submodules when figuring out whether there are local changes

This commit is contained in:
Steve Streeting 2020-06-21 14:35:54 +01:00
parent 4f5fde800c
commit 5a6d9e4efa

View File

@ -51,9 +51,9 @@ try {
$isGit = Test-Path .git
if ($isGit) {
git diff --no-patch --exit-code > $null
git diff --ignore-submodules --no-patch --exit-code > $null
$unstagedChanges = ($LASTEXITCODE -ne 0)
git diff --no-patch --cached --exit-code > $null
git diff --ignore-submodules --no-patch --cached --exit-code > $null
$stagedChanges = ($LASTEXITCODE -ne 0)
if ($unstagedChanges -or $stagedChanges) {