From 287ede88a884fbe9a9806256c8e25f149a462d93 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Wed, 16 Oct 2024 16:31:16 +0200 Subject: [PATCH] Exclude changed but not staged files from nocommit check --- githooks/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/githooks/pre-commit b/githooks/pre-commit index 53ff413..57f5fda 100755 --- a/githooks/pre-commit +++ b/githooks/pre-commit @@ -25,7 +25,7 @@ check() { } get_marks() { - git status --porcelain | cut --bytes 4- | while read file + git status --porcelain | sed "/^[ ?]/d" | cut --bytes 4- | while read file do if [ -e "$temp/index/$file" ] then