Untrack warm-state JSON and keep it out of the worktree

Open Beginner friendly
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
git, javascript, node.js
Domain
tooling

Research direction

Start by running git ls-files scripts to confirm both state files are tracked, then read the write/update sites in scripts/warm.mjs (around lines 32 and 139-140) and scripts/warm-og.mjs (around lines 13 and 44-45) to see where the path is chosen. Add a single state-directory helper honoring an env override and defaulting to ${XDG_STATE_HOME:-$HOME/.local/state}/gitone, update .gitignore, and untrack both files with git rm --cached. Done means git status --porcelain is clean after running both warmers and the location is documented in CONTRIBUTING.md or under scripts/.

Written by the indexing model from the issue text.

Description

bug help wanted

Current behavior

The warmers write their progress into tracked files inside the repository. Every run changes the worktree, creates review noise and can cause merge conflicts.

git status after a run shows:

M scripts/.og-warm-state.json
M scripts/.warm-state.json

Cause

  • .gitignore lists scripts/.warm-state.json, but the file is already tracked; gitignore does not untrack it.
  • scripts/.og-warm-state.json is not ignored at all.
  • scripts/warm.mjs:32 and scripts/warm-og.mjs:13 write state in place; scripts/warm.mjs:139-140 and scripts/warm-og.mjs:44-45 update it.

Expected behavior

Warm state is local runtime data, not source. Move it outside the repository, for example under ${XDG_STATE_HOME:-$HOME/.local/state}/gitone, or under an ignored scripts/.state/ directory. Untrack both files with git rm --cached; add both names to .gitignore; allow an override through an environment variable for CI or multiple checkouts.

Acceptance

  • git ls-files no longer lists either state file.
  • git status --porcelain is clean after a warm run.
  • A fresh checkout can run both warmers without creating tracked changes.
  • The state location is documented in scripts/ or CONTRIBUTING.md.
Dominant language
TypeScript
Stars
7
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LangerSword/gitone

All issues in LangerSword/gitone

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.