Skip to content

armgit / cogit

Public Imported from GitHub
0

Git for the intent behind agent-written code. Records what your coding agent decided and why, and links every commit to it.

fix(cli): name share and ignore in the init and config git help

Eren04ebde43751e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f69b8c..4068d98 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The first download of a team's records shows git's progress meter without one line per session (300 sessions printed over 600 lines), and when it fails, `cogit doctor` shows git's reason instead of "the download failed".
- After upgrading from a version that committed the record, `cogit doctor` asks you to commit the rewritten `.cogit/.gitignore` too; without it teammates and new clones saw `.cogit/sessions/` in `git status`.
- A map with thousands of sessions no longer freezes on "Unfold all" and "Fold all": only the open sessions near the screen are drawn, and the session list no longer does quadratic work (10,000 sessions: 11 s down to 2 s).
+- `cogit init --help` and `cogit config git --help` named the removed `commit` policy; they now say `share` or `ignore`.
## [1.0.0] - 2026-11-04
### Changed
diff --git a/packages/cli/src/program.ts b/packages/cli/src/program.ts
index ae77309..ce59576 100644
--- a/packages/cli/src/program.ts
+++ b/packages/cli/src/program.ts
@@ -408,7 +408,7 @@ export function createProgram(makeIo: IoFactory = processIo, deps: ProgramDeps =
)
.option("--no-project-settings", "leave the project's .claude/settings.json unchanged")
.option("-y, --yes", "accept defaults for every question")
- .addHelpText("after", examples("cogit init", "cogit init ../my-app --git commit --yes"))
+ .addHelpText("after", examples("cogit init", "cogit init ../my-app --git share --yes"))
.action(
run(async (dir: string, opts: InitOptions & { yes?: boolean }) => {
const { yes, ...rest } = opts;
@@ -480,7 +480,7 @@ export function createProgram(makeIo: IoFactory = processIo, deps: ProgramDeps =
.action(run(async (key: string, value: string) => configSet(key, value, makeIo(false))));
config
.command("git")
- .description("show, or switch to commit or ignore, this project's session records (story 9.3)")
+ .description("show, or switch to share or ignore, this project's session records")
.argument("[policy]", "share or ignore; without it, shows the current policy")
.argument("[dir]", "project directory", ".")
.action(
diff --git a/packages/cli/test/program.test.ts b/packages/cli/test/program.test.ts
index 351c738..5f06f81 100644
--- a/packages/cli/test/program.test.ts
+++ b/packages/cli/test/program.test.ts
@@ -63,4 +63,11 @@ describe("createProgram", () => {
expect(help, command).toContain(`$ cogit ${command}`);
}
});
+
+ it("names only the git policies 1.0 accepts, share and ignore", () => {
+ const init = run(["init", "--help"]);
+ expect(init).toContain("--git share");
+ expect(init).not.toMatch(/--git commit/);
+ expect(run(["config", "git", "--help"])).not.toMatch(/\bcommit\b/);
+ });
});