aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-05-18 16:28:46 +0200
committerGitHub <noreply@github.com>2023-05-18 16:28:46 +0200
commit24b60b0f71e0ffbd09c827230ecb5a37e833cade (patch)
treea56478bbacb4c999e77f687a12ddde483c290c15 /cmake
parent826b95203ac9c8decf02e332fbb55cf4ebf73aef (diff)
downloadrneovim-24b60b0f71e0ffbd09c827230ecb5a37e833cade.tar.gz
rneovim-24b60b0f71e0ffbd09c827230ecb5a37e833cade.tar.bz2
rneovim-24b60b0f71e0ffbd09c827230ecb5a37e833cade.zip
build: don't format deleted files
Trying to format deleted files will otherwise throw an error.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Format.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/Format.cmake b/cmake/Format.cmake
index 4115e66705..7e8ca3547d 100644
--- a/cmake/Format.cmake
+++ b/cmake/Format.cmake
@@ -15,21 +15,21 @@ function(get_changed_files outvar)
# Changed files that have been committed
execute_process(
- COMMAND git diff --name-only ${ancestor_commit}...${current_branch}
+ COMMAND git diff --diff-filter=d --name-only ${ancestor_commit}...${current_branch}
OUTPUT_VARIABLE committed_files
OUTPUT_STRIP_TRAILING_WHITESPACE)
separate_arguments(committed_files NATIVE_COMMAND ${committed_files})
# Unstaged files
execute_process(
- COMMAND git diff --name-only
+ COMMAND git diff --diff-filter=d --name-only
OUTPUT_VARIABLE unstaged_files
OUTPUT_STRIP_TRAILING_WHITESPACE)
separate_arguments(unstaged_files NATIVE_COMMAND ${unstaged_files})
# Staged files
execute_process(
- COMMAND git diff --cached --name-only
+ COMMAND git diff --diff-filter=d --cached --name-only
OUTPUT_VARIABLE staged_files
OUTPUT_STRIP_TRAILING_WHITESPACE)
separate_arguments(staged_files NATIVE_COMMAND ${staged_files})