diff options
| author | Ben Sima <ben@bsima.me> | 2025-11-09 08:24:03 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bsima.me> | 2025-11-09 08:24:03 -0500 |
| commit | 5f29e393a6696c6f1e5ef2394bddd58aab7f8eda (patch) | |
| tree | 27e8444456b0b098c917cbbbfd17b5768d421037 /Omni/Task.hs | |
| parent | dd20248176086e0e918e8d982a1e38599ed45a87 (diff) | |
Fix task auto-commit with pre-commit hook
Implemented proper pre-commit hook that: - Calls 'task export --flush'
to consolidate tasks - Auto-stages .tasks/tasks.jsonl if modified -
Runs before every commit
Added reminder message after 'task update' to inform users that task
changes will be committed on next git commit.
Updated AGENTS.md to document the auto-commit behavior.
This fixes the bug where task status updates (e.g., marking tasks as
Done) were not being committed to git.
Diffstat (limited to 'Omni/Task.hs')
| -rw-r--r-- | Omni/Task.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs index ae854a7..0aca674 100644 --- a/Omni/Task.hs +++ b/Omni/Task.hs @@ -153,6 +153,8 @@ move args _ -> panic "Invalid status. Use: open, in-progress, or done" updateTaskStatus tid newStatus putStrLn <| "Updated task " <> T.unpack tid + -- Remind user to commit changes (pre-commit hook will auto-export) + putText "Note: Task changes will be committed automatically on your next git commit." | args `Cli.has` Cli.command "deps" = do tid <- getArgText args "id" showDependencyTree tid |
