diff options
| author | Omni Worker <bot@omni.agent> | 2025-11-21 21:34:55 -0500 |
|---|---|---|
| committer | Omni Worker <bot@omni.agent> | 2025-11-21 21:34:55 -0500 |
| commit | 34ab7f0dff803b68863ae143b661ba8ca24e1642 (patch) | |
| tree | ec812b4c1135261b8aadea50a70987a71028983c | |
| parent | a08cbd6bef26c138b1cb8089cefe767822d0e494 (diff) | |
task: sync status
Amp-Thread-ID:
https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483
Co-authored-by: Amp <amp@ampcode.com>
| -rw-r--r-- | Omni/Agent/Git.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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] |
