Repository navigation
feat: warn when the store has no commits or uncommitted edits - #27
Draft
machado144 wants to merge 1 commit into
Draft
machado144 wants to merge 1 commit into
machado144 wants to merge 1 commit into
Conversation
* status, sync and doctor print a one-line git hint for the store * silent when git is missing or the store is not a git repo Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ PR title follows the required formatCurrent title: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A small change with no spec, since it only adds a warning; say so if you want one written up.
What
loadout initrunsgit initon the store but never commits, so a store can live for months as "main has no commits yet". Store edits then have no history and no rollback, and nothing says so. Nowstatus,syncanddoctorprint one hint line:The hint is silent when git isn't installed, when the store isn't a git repo (
doctornotes that case), and when everything is committed. The hint is printed only; loadout does not commit for you.Tests
internal/store/git_test.go: a fresh store reports no commits, then clean after commit, then 2 uncommitted after edits; a non-repo store gets no warning.integration/store_git_test.go(real binary):status,sync --dry-runanddoctorwarn before the first commit, are silent after it, andsyncreports a later uncommitted edit.go test -race ./...,-tags integration, golangci-lint (0 issues).🤖 Generated with Claude Code