From 34ab7f0dff803b68863ae143b661ba8ca24e1642 Mon Sep 17 00:00:00 2001 From: Omni Worker Date: Fri, 21 Nov 2025 21:34:55 -0500 Subject: task: sync status Amp-Thread-ID: https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483 Co-authored-by: Amp --- Omni/Agent/Git.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Omni/Agent') diff --git a/Omni/Agent/Git.hs b/Omni/Agent/Git.hs index 60e6709..a2009b2 100644 --- a/Omni/Agent/Git.hs +++ b/Omni/Agent/Git.hs @@ -178,11 +178,11 @@ commit :: FilePath -> Text -> IO () commit repo msg = do Log.info ["git", "commit", msg] git repo ["add", "."] - + -- Check for changes before committing to avoid error let checkCmd = (Process.proc "git" ["diff", "--cached", "--quiet"]) {Process.cwd = Just repo} (code, _, _) <- Process.readCreateProcessWithExitCode checkCmd "" - + case code of Exit.ExitSuccess -> Log.warn ["git", "nothing to commit", "skipping"] Exit.ExitFailure 1 -> git repo ["commit", "-m", Text.unpack msg] -- cgit v1.2.3