From 625565e7878ffc696ac1b57a03ee2886551bf0c9 Mon Sep 17 00:00:00 2001 From: piecka Date: Tue, 25 Mar 2025 09:52:23 +0100 Subject: [PATCH] fixed with git diff exit-codes --- .zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index d09568e..a6efb59 100644 --- a/.zshrc +++ b/.zshrc @@ -1,3 +1,4 @@ +# # ─< Check if the given command exists silently >───────────────────────────────────────── command_exists() { command -v "$@" >/dev/null 2>&1 @@ -375,7 +376,7 @@ __alias__() { echo "${CYAN}-- pulled down submodules recursively${NC}" gUpdateModules() { - if git diff --quiet .; then + if ! git diff --exit-code .; then echo "${YELLOW}Staging changes...${NC}" git add . || echo "GIT ADD MISSFUNCTION" sleep 0.3