Repository navigation
Manual mode: Backup Now commits all changes - #54
Merged
Merged
Conversation
4233c03 declared assertAutoManaged a second time. server.js is an ES module, so Node rejects the duplicate and the add-on fails to start on develop. Keep one definition, carrying statusCode 403, and let the retention endpoints return it like the reset and flush endpoints do. Add a CI workflow that syntax-checks the server sources and runs the manual mode tests on pushes to main/develop and on pull requests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In manual mode the repository belongs to the user, but Backup Now only staged existing files matching include_extensions/include_storage. Deleted files and changes to tracked files of other types (.py, .js, ...) were never committed. In manual mode Backup Now now stages like `git add -A`, so the user's .gitignore decides what is committed. exclude_files and exclude_folders stay a hard gate: they are excluded from staging and unstaged if they were staged beforehand. The "nothing to commit" check now looks at the index instead of the whole working tree, so unstaged leftovers (an excluded file, or in auto mode an untracked non-config file) no longer make git commit fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Manual mode is meant for a repository the user manages, with "Backup Now" as the way to commit. But Backup Now only stages existing files that match
include_extensions/include_storage:automations_old.yamlstays in the repo..py,.js,.jinja,.storage/person, ...).secrets.yamlfrom a terminal), it was committed anyway.Changes
git add -A. The user's.gitignoredecides what is committed.exclude_files/exclude_foldersstay a hard gate: they're excluded from staging (:(exclude,literal)pathspecs, same prefix semantics asshouldIgnoreWatchPath) and unstaged if they were staged beforehand.git commitfail.Tests
New test in
tests/manual-mode.test.mjs: modify a tracked.py, delete a tracked YAML, add a.txt, write a file the user's.gitignoreignores, and modify plus pre-stage an excludedsecrets.yaml. Then:A notes.txt,D automations.yaml,M script.pysecrets.yamlstays modified and unstagedWithout this change the test fails: the commit contains only
secrets.yaml. All 5 tests pass with it.🤖 Generated with Claude Code