From 63938f1da1b07305f808259d79f9100e88d9c362 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 2 Mar 2024 07:41:02 -1000 Subject: [PATCH] ;just:format: be silent if there's no changes to commit --- Justfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Justfile b/Justfile index 0291998fb1c..822efc51cce 100644 --- a/Justfile +++ b/Justfile @@ -59,9 +59,9 @@ alias h := help @check: just --fmt --unstable --check -# if this justfile is error free but in non-standard format, reformat and commit it +# if this justfile is error free but in non-standard format, reformat it, and if it has changes, commit it @format: - just -q chk || just --fmt --unstable && git commit -m ';just: format' -- {{ justfile() }} + just -q chk || just -q --fmt --unstable && git diff --quiet || git commit -m ';just: format' -- {{ justfile() }} # rerun RECIPE when any watched-by-default file changes watch RECIPE *JOPTS: