docs: add Testing section to README#34
Merged
Merged
Conversation
Adds a dedicated Testing section to README with commands for running tests and a stats table (38 test files, 330 test functions). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a dedicated Testing section to the project README to make it easier for contributors to discover how to run the Go test suite and understand the current test suite size at a glance, placing it before Development for better onboarding flow.
Changes:
- Adds a new Testing section with common
make test/go testcommands (including race detection and package/test selection examples). - Adds a small Test Stats table to summarize the current test footprint.
- Updates the Table of Contents with anchors for the new sections.
alexandreafj
added a commit
that referenced
this pull request
May 29, 2026
The Test Stats table had drifted (38 files / 330 functions): test functions were added since the stats landed in #34 without updating the count, and this branch adds two test files (merge_test.go, sync_test.go). Counts exclude the single TestMain harness entry point, which is not a test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
alexandreafj
added a commit
that referenced
this pull request
May 29, 2026
* feat: add sync command to merge default branch into current branch Updating a feature branch with the latest master/main was a manual chore: run `gitm checkout master -r <repo>`, then cd into each repo and `git merge master` by hand, repeated per repo. `gitm sync` automates this across selected repos in parallel — interactively, or via --repo/--all. For each repo it auto-detects the default branch (main/master) from the stored value, skips dirty repos and repos already on the default branch, fetches the latest default from origin, and merges origin/<default> into the current branch. Merge conflicts are intentionally left in place and reported so the user can resolve them, rather than aborting or failing the whole run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: refresh test stats to 40 files / 367 functions The Test Stats table had drifted (38 files / 330 functions): test functions were added since the stats landed in #34 without updating the count, and this branch adds two test files (merge_test.go, sync_test.go). Counts exclude the single TestMain harness entry point, which is not a test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: address PR review on sync — clean-tree check, error exit, fetch fallback Resolves four review findings on the new sync command: - Require a fully clean working tree (git.IsDirty) instead of tracked-only. A merge can be blocked by an untracked file that collides with a path the default branch introduces, so untracked changes must skip the repo too — IsDirtyTrackedOnly is documented as safe only when untracked files pose no conflict risk, which is not the case for a merge. - Return a non-zero error when runner.HasErrors, matching the other multi-repo commands. Real failures (status/branch errors, non-conflict merge errors) now surface; merge conflicts remain intentional skips that still exit 0. - Stop printing the fetch-failure warning from inside the parallel worker (which could interleave with the runner's synchronized output) and fold it into the returned result message instead. - Prefer origin/<default> only when the fetch succeeded; on a failed/offline fetch fall back to the local default branch rather than silently merging a stale remote-tracking ref. Adds tests for the untracked-skip and error-exit paths; refreshes test stats. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: fix misleading "checkout master then merge master" wording The sync help text and README described the manual workflow as `gitm checkout master` followed by `git merge master`, but that sequence leaves you on the default branch and makes the merge a no-op. Reword both to describe what sync actually replaces: pulling the latest master/main and merging it into your working branch by hand, per repo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <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.
Summary
Running Testscommands and aTest StatstableTest plan
🤖 Generated with Claude Code