git 5.1.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +45 -0
  3. data/CONTRIBUTING.md +185 -165
  4. data/LICENSE +1 -1
  5. data/README.md +151 -151
  6. data/git.gemspec +35 -3
  7. data/lib/git/command_line/base.rb +1 -2
  8. data/lib/git/commands/base.rb +1 -1
  9. data/lib/git/commands/cat_file/raw.rb +8 -7
  10. data/lib/git/repository/branching.rb +79 -5
  11. data/lib/git/version.rb +1 -1
  12. metadata +5 -94
  13. data/.claude/commands/address-copilot-reviews.md +0 -14
  14. data/.claude/settings.json +0 -16
  15. data/.claude/skills +0 -1
  16. data/.commitlintrc.yml +0 -38
  17. data/.dockerignore +0 -27
  18. data/.github/copilot-instructions.md +0 -30
  19. data/.github/hooks/bin-setup-on-worktree.json +0 -11
  20. data/.github/hooks/run-bin-setup-once.sh +0 -20
  21. data/.github/issue_template.md +0 -15
  22. data/.github/prompts/iteratively-address-copilot-reviews.prompt.md +0 -188
  23. data/.github/pull_request_template.md +0 -21
  24. data/.github/skills/breaking-change-analysis/SKILL.md +0 -99
  25. data/.github/skills/ci-cd-troubleshooting/SKILL.md +0 -264
  26. data/.github/skills/command-implementation/REFERENCE.md +0 -994
  27. data/.github/skills/command-implementation/SKILL.md +0 -230
  28. data/.github/skills/command-test-conventions/SKILL.md +0 -664
  29. data/.github/skills/command-yard-documentation/SKILL.md +0 -434
  30. data/.github/skills/dependency-management/SKILL.md +0 -72
  31. data/.github/skills/development-workflow/SKILL.md +0 -512
  32. data/.github/skills/facade-implementation/REFERENCE.md +0 -837
  33. data/.github/skills/facade-implementation/SKILL.md +0 -269
  34. data/.github/skills/facade-test-conventions/SKILL.md +0 -391
  35. data/.github/skills/facade-yard-documentation/SKILL.md +0 -435
  36. data/.github/skills/make-skill-template/SKILL.md +0 -226
  37. data/.github/skills/pr-readiness-review/SKILL.md +0 -205
  38. data/.github/skills/project-context/SKILL.md +0 -306
  39. data/.github/skills/pull-request-review/SKILL.md +0 -168
  40. data/.github/skills/rebase/SKILL.md +0 -148
  41. data/.github/skills/refactor-command-to-commandlineresult/SKILL.md +0 -131
  42. data/.github/skills/release-management/SKILL.md +0 -125
  43. data/.github/skills/resolve-feedback/SKILL.md +0 -288
  44. data/.github/skills/review-arguments-dsl/CHECKLIST.md +0 -788
  45. data/.github/skills/review-arguments-dsl/SKILL.md +0 -214
  46. data/.github/skills/review-cross-command-consistency/SKILL.md +0 -139
  47. data/.github/skills/reviewing-skills/SKILL.md +0 -214
  48. data/.github/skills/rspec-unit-testing-standards/SKILL.md +0 -685
  49. data/.github/skills/tdd-refactor-step/SKILL.md +0 -236
  50. data/.github/skills/test-debugging/SKILL.md +0 -161
  51. data/.github/skills/yard-documentation/SKILL.md +0 -981
  52. data/.github/skills/yard-documentation/element-rules.md +0 -162
  53. data/.github/skills-deprecated/README.md +0 -21
  54. data/.github/skills-deprecated/extract-command-from-lib/SKILL.md +0 -487
  55. data/.github/skills-deprecated/extract-facade-from-base-lib/KEYWORD_ARG_REMEDIATION.md +0 -22
  56. data/.github/skills-deprecated/extract-facade-from-base-lib/SKILL.md +0 -600
  57. data/.github/skills-deprecated/review-backward-compatibility/SKILL.md +0 -275
  58. data/.github/workflows/continuous_integration.yml +0 -358
  59. data/.github/workflows/enforce_conventional_commits.yml +0 -35
  60. data/.github/workflows/experimental_continuous_integration.yml +0 -59
  61. data/.github/workflows/release.yml +0 -52
  62. data/.github/workflows/warm_bundler_caches.yml +0 -82
  63. data/.gitignore +0 -30
  64. data/.husky/commit-msg +0 -1
  65. data/.husky/pre-commit +0 -13
  66. data/.release-please-config.json +0 -36
  67. data/.release-please-manifest.json +0 -3
  68. data/.rspec +0 -2
  69. data/.rubocop.yml +0 -44
  70. data/.rubocop_todo.yml +0 -30
  71. data/.yard-lint.yml +0 -75
  72. data/CLAUDE.md +0 -11
  73. data/Gemfile +0 -22
  74. data/Rakefile +0 -41
  75. data/docker/test/Dockerfile +0 -32
  76. data/docker/test/docker-compose.yml +0 -0
  77. data/package.json +0 -10
  78. data/redesign/1_architecture_existing.md +0 -102
  79. data/redesign/2_architecture_redesign.md +0 -449
  80. data/redesign/3_architecture_implementation.md +0 -1623
  81. data/redesign/Phase 4 - Step A.md +0 -366
  82. data/redesign/Phase 4 - Step B.md +0 -921
  83. data/redesign/Phase 4 - Step C.md +0 -833
  84. data/redesign/beta_release.md +0 -107
  85. data/redesign/branch_parse_refactor_plan.md +0 -163
  86. data/redesign/c1a-public-api-scope.tsv +0 -256
  87. data/redesign/c1c2_audit.md +0 -566
  88. data/redesign/c1c2_bucket6_lib_orphans.md +0 -626
  89. data/redesign/config_design.rb +0 -501
  90. data/redesign/index.md +0 -34
  91. data/redesign/info_object_migration_plan.md +0 -126
  92. data/redesign/integration_test_analysis.md +0 -521
  93. data/redesign/phase-4-step-b-test-audit.tsv +0 -485
  94. data/redesign/remote_refactor_plan.md +0 -164
  95. data/redesign/reverse_dependencies.sql +0 -44
  96. data/tasks/gem_tasks.rake +0 -14
  97. data/tasks/npm_tasks.rake +0 -7
  98. data/tasks/rspec.rake +0 -111
  99. data/tasks/rubocop.rake +0 -5
  100. data/tasks/test_gem.rake +0 -12
  101. data/tasks/yard.rake +0 -57
@@ -1,21 +0,0 @@
1
- Review our [guidelines for contributing](https://github.com/ruby-git/ruby-git/blob/main/CONTRIBUTING.md) to this repository. A good start is to:
2
-
3
- - Write tests for your changes
4
- - Run `rake` before pushing
5
- - Include / update docs in the README.md and in YARD documentation
6
-
7
- # Description
8
-
9
- \<your description here\>
10
-
11
- ## Checklist
12
-
13
- - [ ] I reviewed and applied the project's [AI Policy](../AI_POLICY.md). I understand
14
- and verify any AI-assisted changes included in this PR and ensured they meet
15
- quality, security, and licensing standards.
16
- - [ ] I ran `bundle exec rake` locally on this branch and it passed (see
17
- [Local development setup](../CONTRIBUTING.md#local-development-setup)).
18
- - [ ] Tests added/updated as needed.
19
- - [ ] `bundle exec rake spec:unit` reports 100% line and branch coverage (see
20
- [Test coverage policy](../CONTRIBUTING.md#test-coverage-policy)).
21
- - [ ] Documentation updated where applicable (README and/or YARD).
@@ -1,99 +0,0 @@
1
- ---
2
- name: breaking-change-analysis
3
- description: "Assesses the impact of API changes before implementation to understand what code would break and plan appropriate migration paths. Use when removing methods, changing interfaces, or planning deprecations."
4
- ---
5
-
6
- # Breaking Change Analysis Workflow
7
-
8
- Assess the impact of API changes before implementation. Use when removing methods,
9
- changing method signatures, altering return types/values, changing exception types,
10
- or modifying default behavior.
11
-
12
- ## Contents
13
-
14
- - [How to use this skill](#how-to-use-this-skill)
15
- - [Related skills](#related-skills)
16
- - [Step 1: Identify the Change Scope](#step-1-identify-the-change-scope)
17
- - [Step 2: Find All Usages](#step-2-find-all-usages)
18
- - [Step 3: Assess and Document Impact](#step-3-assess-and-document-impact)
19
- - [Step 4: Plan Migration Path](#step-4-plan-migration-path)
20
-
21
- ## How to use this skill
22
-
23
- Attach this file to your Copilot Chat context, then invoke it with the specific
24
- API/method change you are considering. Use this workflow before coding to assess
25
- impact and plan migration.
26
-
27
- ## Related skills
28
-
29
- - [Development Workflow](../development-workflow/SKILL.md) — implement required
30
- changes using strict TDD
31
-
32
- ## Step 1: Identify the Change Scope
33
-
34
- 1. Determine which classes and methods are affected.
35
- 2. Check API visibility (`@api public` vs `@api private` in YARD docs).
36
- 3. Check if the change affects `Git::Repository` (the current facade layer, modules under `lib/git/repository/`).
37
-
38
- ## Step 2: Find All Usages
39
-
40
- 1. **Internal usages:**
41
-
42
- ```bash
43
- grep -rn "method_name" lib/ spec/
44
- ```
45
-
46
- 2. **External usage (if applicable):**
47
-
48
- ```bash
49
- gh search code "Git::Repository#method_name language:ruby"
50
- ```
51
-
52
- ## Step 3: Assess and Document Impact
53
-
54
- Produce an impact assessment:
55
-
56
- ```markdown
57
- ## Breaking Change Impact Assessment
58
-
59
- ### Change Description
60
- [What is being changed]
61
-
62
- ### Affected API
63
- - Class: `Git::SomeClass`
64
- - Method: `#some_method`
65
- - Current signature: `def some_method(arg, opts = {})`
66
- - Proposed signature: `def some_method(arg, force: false)`
67
-
68
- ### Internal Impact
69
- - Files affected: X
70
- - Tests to update: Y
71
-
72
- ### External Impact
73
- - Severity: [High/Medium/Low]
74
- - Migration difficulty: [Easy/Medium/Hard]
75
-
76
- ### Migration Path
77
- [How users should update their code]
78
- ```
79
-
80
- ## Step 4: Plan Migration Path
81
-
82
- **Project versioning policy:**
83
- - Breaking changes are batched for major releases
84
- - Use deprecation warnings in the current major series before removal in the next major release
85
-
86
- **Deprecation approach:**
87
-
88
- ```ruby
89
- # @deprecated Use {#new_method} instead. Will be removed in the next major release.
90
- def old_method(*args)
91
- warn "[DEPRECATION] `old_method` is deprecated. Use `new_method` instead."
92
- new_method(*args)
93
- end
94
- ```
95
-
96
- **Documentation requirements:**
97
- - Add `@deprecated` YARD tag with migration guidance
98
- - Mark commits with `!` for breaking changes and include `BREAKING CHANGE:` footer
99
- - DO NOT update CHANGELOG.md — it is auto-generated from commit messages
@@ -1,264 +0,0 @@
1
- ---
2
- name: ci-cd-troubleshooting
3
- description: "Diagnoses and fixes CI/CD failures in GitHub Actions workflows. Use when CI is failing on a PR, builds are broken, or tests pass locally but fail in CI."
4
- ---
5
-
6
- # CI/CD Troubleshooting Workflow
7
-
8
- When asked to diagnose or fix CI/CD failures (e.g., "Why is CI failing on PR #999?",
9
- "Fix the failing build"), follow this workflow to identify the root cause and
10
- optionally implement fixes.
11
-
12
- ## Contents
13
-
14
- - [How to use this skill](#how-to-use-this-skill)
15
- - [Related skills](#related-skills)
16
- - [Step 1: Identify the Failure](#step-1-identify-the-failure)
17
- - [Step 2: Fetch Relevant Logs](#step-2-fetch-relevant-logs)
18
- - [Step 3: Diagnose Root Cause](#step-3-diagnose-root-cause)
19
- - [Step 4: Reproduce Locally (if applicable)](#step-4-reproduce-locally-if-applicable)
20
- - [Step 5: Report Findings or Fix](#step-5-report-findings-or-fix)
21
- - [Option A: Diagnostic Report ("Why is CI failing?")](#option-a-diagnostic-report-why-is-ci-failing)
22
- - [Option B: Implement Fix ("Fix the failing build")](#option-b-implement-fix-fix-the-failing-build)
23
- - [Step 6: Verify Fix](#step-6-verify-fix)
24
- - [Special Troubleshooting Considerations](#special-troubleshooting-considerations)
25
-
26
- ## How to use this skill
27
-
28
- Attach this file to your Copilot Chat context, then invoke it with a failing PR
29
- number, branch, or CI run context. Use Option A for diagnosis-only requests and
30
- Option B when the user explicitly asks for a fix.
31
-
32
- ## Related skills
33
-
34
- - [Test Debugging](../test-debugging/SKILL.md) — deep-dive test failure analysis
35
- and flakiness fixes
36
- - [Development Workflow](../development-workflow/SKILL.md) — full TDD execution
37
- when implementing CI fixes
38
- - [PR Readiness Review](../pr-readiness-review/SKILL.md) — final validation
39
- before opening or updating a PR
40
-
41
- ## Step 1: Identify the Failure
42
-
43
- 1. **Get CI Status:**
44
- - For PRs: `gh pr checks #999`
45
- - For branches: `gh run list --branch <branch-name> --limit 5`
46
- - Note which jobs passed and which failed
47
-
48
- 2. **Categorize the Failure Type:**
49
- - **Test failures** - Unit tests, integration tests failing
50
- - **Linter failures** - Rubocop, YARD documentation issues
51
- - **Build failures** - Dependency installation, compilation errors
52
- - **Timeout failures** - Jobs exceeding time limits
53
- - **Platform-specific failures** - Failing on specific Ruby version or OS
54
-
55
- 3. **Identify Specific Failing Steps:**
56
- - Note the exact job name and step that failed
57
- - Record the Ruby version, OS, and other environment details
58
-
59
- ## Step 2: Fetch Relevant Logs
60
-
61
- **CRITICAL: CI logs can be massive (100K+ lines) and exceed token limits.**
62
-
63
- 1. **Get the Run ID:**
64
-
65
- ```bash
66
- gh run list --branch <branch> --limit 1 --json databaseId --jq '.[0].databaseId'
67
- ```
68
-
69
- 2. **Fetch Failed Job Logs Only:**
70
-
71
- ```bash
72
- gh run view <run-id> --log-failed
73
- ```
74
-
75
- This limits output to only failed jobs, making it manageable.
76
-
77
- 3. **Extract Key Error Information:**
78
-
79
- - For test failures: Look for stack traces, assertion errors, specific test names
80
- - For linter failures: Extract file names, line numbers, and violation types
81
- - For build failures: Find dependency errors or missing packages
82
- - Use `grep` to filter logs if still too large:
83
-
84
- ```bash
85
- gh run view <run-id> --log-failed | grep -A 10 -B 5 "Error\|FAILED\|Failure"
86
- ```
87
-
88
- 4. **Avoid Full Log Downloads:**
89
-
90
- - Do NOT use `--log` without `--log-failed` unless specifically requested
91
- - If logs are still too large, focus on the most recent or critical failure
92
-
93
- ## Step 3: Diagnose Root Cause
94
-
95
- Based on the failure type, investigate:
96
-
97
- **For Test Failures:**
98
-
99
- - Check if the test exists and what it's testing
100
- - Look for recent changes that might have broken the test
101
- - Consider environment differences (local vs. CI)
102
- - Check for flaky tests (intermittent failures)
103
-
104
- **For Linter Failures:**
105
-
106
- - Run linters locally: `bundle exec rubocop` and `bundle exec rake yard`
107
- - Identify specific violations from the log
108
- - Check if violations are in files related to recent changes
109
-
110
- **For Build Failures:**
111
-
112
- - Check dependency versions in `Gemfile` and `git.gemspec`
113
- - Look for platform-specific dependency issues
114
- - Verify Ruby version compatibility
115
-
116
- **For Timeout Failures:**
117
-
118
- - Identify which test or step is timing out
119
- - Check for infinite loops or performance regressions
120
- - Consider if it's a resource limitation in CI environment
121
-
122
- ## Step 4: Reproduce Locally (if applicable)
123
-
124
- **For PR Failures:**
125
-
126
- 1. Fetch the PR branch:
127
-
128
- ```bash
129
- gh pr checkout #999
130
- ```
131
-
132
- 2. Run the failing tests locally:
133
-
134
- ```bash
135
- bundle exec rspec <path/to/spec.rb>
136
- ```
137
-
138
- 3. Run linters:
139
-
140
- ```bash
141
- bundle exec rubocop
142
- bundle exec rake yard
143
- ```
144
-
145
- **For Branch Failures:**
146
-
147
- 1. Checkout the branch.
148
- 2. Run full CI workflow:
149
-
150
- ```bash
151
- bundle exec rake default
152
- ```
153
-
154
- ## Step 5: Report Findings or Fix
155
-
156
- Determine the appropriate action based on the user's request:
157
-
158
- ### Option A: Diagnostic Report ("Why is CI failing?")
159
-
160
- Present findings to the user:
161
-
162
- ````markdown
163
- # CI Failure Diagnosis: <Branch/PR>
164
-
165
- **Status:** <X of Y jobs failed>
166
-
167
- ## Failed Jobs
168
- 1. **<Job Name>** (<Ruby version>, <OS>)
169
- - **Step:** <failing step name>
170
- - **Failure Type:** <test/linter/build/timeout>
171
-
172
- ## Root Cause
173
- <Explanation of what's causing the failure>
174
-
175
- ## Error Details
176
- ```
177
- <Relevant error messages and stack traces>
178
- ```
179
-
180
- ## Recommendations
181
- - <Specific fix suggestion 1>
182
- - <Specific fix suggestion 2>
183
-
184
- **Would you like me to implement a fix, or do you need more information?**
185
- ````
186
-
187
- **STOP here** unless the user asks you to proceed with fixes.
188
-
189
- ### Option B: Implement Fix ("Fix the failing build")
190
-
191
- Proceed based on failure type:
192
-
193
- - **Test Failures:** Use the full TDD workflow (Phase 1-3) to fix the failing tests
194
- - **Linter Failures:** Fix violations directly, commit with appropriate message
195
- (e.g., `style: fix rubocop violations in lib/git/base.rb`)
196
- - **Build Failures:** Update dependencies or configuration as needed
197
- - **Timeout Failures:** Investigate performance issues, may require user guidance
198
-
199
- **For PR Failures on Someone Else's PR:**
200
-
201
- - You may not have push access to their branch
202
- - Present the fix and ask user to either:
203
- - Push to the PR branch (if they have access)
204
- - Comment on the PR with suggested changes
205
- - Create a new PR with fixes
206
-
207
- ## Step 6: Verify Fix
208
-
209
- After implementing fixes:
210
-
211
- 1. **Run Affected Tests Locally:**
212
-
213
- ```bash
214
- bundle exec rspec <path/to/spec.rb>
215
- ```
216
-
217
- 2. **Run Full CI Suite:**
218
-
219
- ```bash
220
- bundle exec rake default
221
- ```
222
-
223
- 3. **Push and Monitor:**
224
-
225
- - Push the fixes
226
- - Monitor CI to confirm the fix worked:
227
-
228
- ```bash
229
- gh run watch
230
- ```
231
-
232
- 4. **Confirm Resolution:**
233
-
234
- ```text
235
- Fix implemented and pushed. Monitoring CI run...
236
- CI Status: <link to run>
237
- ```
238
-
239
- ## Special Troubleshooting Considerations
240
-
241
- **Platform-Specific Failures:**
242
-
243
- - If tests pass on macOS but fail on Linux/Windows, document the difference
244
- - Check for path separator issues (`/` vs. `\`)
245
- - Look for encoding differences
246
- - Consider file system case sensitivity
247
-
248
- **Flaky Tests:**
249
-
250
- - If a test fails intermittently, note this in your diagnosis
251
- - Run the test multiple times locally to confirm flakiness
252
- - Suggest fixes for race conditions or timing issues
253
-
254
- **Permission Issues:**
255
-
256
- - If you can't push to a PR branch, clearly communicate this limitation
257
- - Provide the exact commands or changes needed for the user to apply
258
-
259
- **Token Limit Management:**
260
-
261
- - Always use `--log-failed` to limit output
262
- - If logs are still too large, use `grep` to extract errors
263
- - Focus on the first failure if multiple failures exist
264
- - Consider running tests locally instead of relying on full CI logs