Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ src/cocoindex_code/_version.py

# CocoIndex
.cocoindex_code/
# CocoIndex Code (ccc)
/.cocoindex_code/
2 changes: 1 addition & 1 deletion src/cocoindex_code/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _on_progress(progress: IndexingProgress) -> None:
raise _typer.Exit(code=1)


_GITIGNORE_COMMENT = "# cocoindex-code"
_GITIGNORE_COMMENT = "# CocoIndex Code (ccc)"
_GITIGNORE_ENTRY = "/.cocoindex_code/"


Expand Down
6 changes: 3 additions & 3 deletions tests/test_cli_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_add_to_gitignore_creates_file(tmp_path: Path) -> None:
gitignore = tmp_path / ".gitignore"
assert gitignore.is_file()
content = gitignore.read_text()
assert "# cocoindex-code" in content
assert "# CocoIndex Code (ccc)" in content
assert "/.cocoindex_code/" in content


Expand Down Expand Up @@ -111,11 +111,11 @@ def test_add_to_gitignore_skips_when_no_git(tmp_path: Path) -> None:

def test_remove_from_gitignore(tmp_path: Path) -> None:
gitignore = tmp_path / ".gitignore"
gitignore.write_text("*.pyc\n# cocoindex-code\n/.cocoindex_code/\n__pycache__/\n")
gitignore.write_text("*.pyc\n# CocoIndex Code (ccc)\n/.cocoindex_code/\n__pycache__/\n")
remove_from_gitignore(tmp_path)
content = gitignore.read_text()
assert "/.cocoindex_code/" not in content
assert "# cocoindex-code" not in content
assert "# CocoIndex Code (ccc)" not in content
assert "*.pyc" in content
assert "__pycache__/" in content

Expand Down
Loading