From b14cb633f45b4ad88a059705ce46f7dbe3f24bfc Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Mon, 8 Jan 2024 12:00:00 +0100 Subject: [PATCH] pre-commit: show not staged changes (pre-commit checkers may have made some too) Signed-off-by: Bernhard Kaindl --- .pre-commit-config.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index afb1561f..7ef44bf8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -120,3 +120,13 @@ repos: name: Run pytype to check the unit tests for any typing warnings (does not work on bugtool yet) exclude: xen-bugtool additional_dependencies: [pytest] + + +- repo: local + hooks: + - id: git-diff # Ref: https://github.com/pre-commit/pre-commit/issues/1712 + name: Show not staged changes (fixups may make them too) + entry: git diff --exit-code + language: system + pass_filenames: false + always_run: true