Skip to content

Remove accidentally committed stray test database (fixes Windows clones) - #277

Open
leo7martins wants to merge 1 commit into
dbcli:mainfrom
leo7martins:remove-stray-test-db
Open

leo7martins wants to merge 1 commit into
dbcli:mainfrom
leo7martins:remove-stray-test-db

Conversation

@leo7martins

Copy link
Copy Markdown

Fixes #276.

Description

Commit 78c07d3 ("Fix #245", merged via #255) accidentally swept local test artifacts into the tree alongside the real change:

  • a SQLite database file literally named C:\Users\litecli\litecli_test.db
  • .tox/.pkg/file.lock

The test suite connects to that literal path (tests/test_main.py); on Linux/CI backslashes are legal filename characters, so running the tests creates the file, and it got picked up (presumably with git add -A):

$ git show --stat 78c07d3
 .tox/.pkg/file.lock                   | 0
 "C:\Users\litecli\litecli_test.db" | 0
 tests/test_main.py                    | 2 +-

An absolute Windows path as a filename cannot exist on NTFS, so git clone of this repository fails outright on Windows (error: invalid path ..., fatal: unable to checkout working tree) — #276.

This PR removes both stray files. No code changes:

  • tests/test_main.py passes on this branch (16 passed) — the affected test creates the database on demand and does not rely on the tracked artifact.
  • Proof of the fix: git clone --branch remove-stray-test-db https://github.com/leo7martins/litecli.git completes successfully on Git-for-Windows (the same clone of main fails with the invalid-path error).

Possible follow-up (left to maintainers, happy to send it separately): make that test avoid a path that materializes as a weird leftover file on POSIX, or add the artifact to .gitignore so a git add -A can never re-commit it.

Checklist

  • I've added this contribution to the CHANGELOG.md file.

Found during an AI-assisted contribution session (Mistral Vibe); I reviewed and verified the change, including the Windows clone reproduction before and after.

Commit 78c07d3 ("Fix dbcli#245", via dbcli#255) swept local test artifacts into
the tree: a SQLite database literally named with an absolute Windows
path (the tests connect to that path, and on Linux/CI backslashes are
legal filename characters, so the file existed locally and got picked
up by git add -A), plus a .tox/.pkg/file.lock.

The absolute-path filename makes git clone fail outright on Windows
(error: invalid path; unable to checkout working tree) - see dbcli#276.

Removing both stray files. No code changes: the test that connects to
the path still passes (it creates the database on demand).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant