Skip to content

Commit 3a59352

Browse files
authored
chore: minor tweak to comments added to users .gitignore (#80)
1 parent cd4b237 commit 3a59352

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@ src/cocoindex_code/_version.py
4646

4747
# CocoIndex
4848
.cocoindex_code/
49+
# CocoIndex Code (ccc)
50+
/.cocoindex_code/

src/cocoindex_code/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def _on_progress(progress: IndexingProgress) -> None:
160160
raise _typer.Exit(code=1)
161161

162162

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

166166

tests/test_cli_helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_add_to_gitignore_creates_file(tmp_path: Path) -> None:
8181
gitignore = tmp_path / ".gitignore"
8282
assert gitignore.is_file()
8383
content = gitignore.read_text()
84-
assert "# cocoindex-code" in content
84+
assert "# CocoIndex Code (ccc)" in content
8585
assert "/.cocoindex_code/" in content
8686

8787

@@ -111,11 +111,11 @@ def test_add_to_gitignore_skips_when_no_git(tmp_path: Path) -> None:
111111

112112
def test_remove_from_gitignore(tmp_path: Path) -> None:
113113
gitignore = tmp_path / ".gitignore"
114-
gitignore.write_text("*.pyc\n# cocoindex-code\n/.cocoindex_code/\n__pycache__/\n")
114+
gitignore.write_text("*.pyc\n# CocoIndex Code (ccc)\n/.cocoindex_code/\n__pycache__/\n")
115115
remove_from_gitignore(tmp_path)
116116
content = gitignore.read_text()
117117
assert "/.cocoindex_code/" not in content
118-
assert "# cocoindex-code" not in content
118+
assert "# CocoIndex Code (ccc)" not in content
119119
assert "*.pyc" in content
120120
assert "__pycache__/" in content
121121

0 commit comments

Comments
 (0)