Skip to content

docs: add Testing section to README#34

Merged
alexandreafj merged 1 commit into
masterfrom
docs/add-testing-section-to-readme
May 4, 2026
Merged

docs: add Testing section to README#34
alexandreafj merged 1 commit into
masterfrom
docs/add-testing-section-to-readme

Conversation

@alexandreafj
Copy link
Copy Markdown
Owner

@alexandreafj alexandreafj commented May 4, 2026

Summary

  • Adds a Testing section to README with Running Tests commands and a Test Stats table
  • Adds TOC entries for the new sections
  • Placed before the Development section for logical reading order

Test plan

  • Verify README renders correctly on GitHub
  • Confirm TOC links anchor to the new sections

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 4, 2026 14:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 test commands (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 alexandreafj merged commit f465ac6 into master May 4, 2026
4 checks passed
@alexandreafj alexandreafj deleted the docs/add-testing-section-to-readme branch May 4, 2026 14:47
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants