Repository navigation
Fix 1 problem from the log (tasks) - #270
Merged
Merged
Conversation
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.
I fixed the six "runs without a worktree" warnings. Non-coding tasks in a git repository with no commits now run with an info log line instead of a warning and a notification. Typecheck is clean and
tasks.test.tspasses (74 tests), including a new test for this case.Cause
The workspace folder was a repository that had just been created with
git initand had no commits yet. Itsmasterbranch had no commit, so there was nothing to branch a worktree from.prepareWorktreethen threw "The branch "master" doesn't exist". Non-coding tasks already handled this correctly by working in the folder directly. But each task start logged awarnand sent a "works without its own worktree" notification, which gave six warnings in 20 minutes. The message also pointed at the wrong cause.Changes
packages/core/src/tasks/git.ts: addedEmptyRepoError(aGitError). For a local repository,prepareWorktreenow checks for any branch after the fetch. If there is none, it throws<path> has no commits yet — commit once so tasks can branch from it.packages/core/src/tasks/service.ts: for non-coding tasks, this case is now aninfolog with no notification, since working in the folder is all that's possible there. Other worktree failures still warn and notify as before. Coding tasks are blocked as before, but the reason now names the actual problem.packages/core/test/tasks.test.ts: new test with a repository that has no commits. A research task finishes without a worktree and without a warning notification, and a coding task is blocked with "has no commits yet".Checks
origin/mainbefore finishing; it was already up to date.56f7ae99.Nothing for you to do. Once that repository gets its first commit, tasks will get their own worktrees again.
Task #77 · done by Self-Healer with Godmode Bot