git 5.1.0 → 5.3.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 (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +78 -0
  3. data/CONTRIBUTING.md +202 -169
  4. data/LICENSE +1 -1
  5. data/README.md +192 -151
  6. data/UPGRADING.md +287 -1
  7. data/git.gemspec +35 -3
  8. data/lib/git/author.rb +11 -0
  9. data/lib/git/author_info.rb +66 -0
  10. data/lib/git/branch.rb +210 -15
  11. data/lib/git/branch_info.rb +1 -1
  12. data/lib/git/branches.rb +35 -7
  13. data/lib/git/command_line/base.rb +1 -2
  14. data/lib/git/commands/base.rb +1 -1
  15. data/lib/git/commands/cat_file/raw.rb +62 -7
  16. data/lib/git/object.rb +13 -7
  17. data/lib/git/parsers/stash.rb +50 -17
  18. data/lib/git/parsers/tag.rb +54 -8
  19. data/lib/git/remote.rb +37 -7
  20. data/lib/git/remote_info.rb +67 -10
  21. data/lib/git/repository/branching.rb +190 -6
  22. data/lib/git/repository/merging.rb +96 -2
  23. data/lib/git/repository/remote_operations.rb +57 -0
  24. data/lib/git/repository/shared_private.rb +67 -0
  25. data/lib/git/stash_info.rb +32 -34
  26. data/lib/git/tag_info.rb +21 -29
  27. data/lib/git/version.rb +1 -1
  28. data/lib/git.rb +1 -0
  29. metadata +6 -94
  30. data/.claude/commands/address-copilot-reviews.md +0 -14
  31. data/.claude/settings.json +0 -16
  32. data/.claude/skills +0 -1
  33. data/.commitlintrc.yml +0 -38
  34. data/.dockerignore +0 -27
  35. data/.github/copilot-instructions.md +0 -30
  36. data/.github/hooks/bin-setup-on-worktree.json +0 -11
  37. data/.github/hooks/run-bin-setup-once.sh +0 -20
  38. data/.github/issue_template.md +0 -15
  39. data/.github/prompts/iteratively-address-copilot-reviews.prompt.md +0 -188
  40. data/.github/pull_request_template.md +0 -21
  41. data/.github/skills/breaking-change-analysis/SKILL.md +0 -99
  42. data/.github/skills/ci-cd-troubleshooting/SKILL.md +0 -264
  43. data/.github/skills/command-implementation/REFERENCE.md +0 -994
  44. data/.github/skills/command-implementation/SKILL.md +0 -230
  45. data/.github/skills/command-test-conventions/SKILL.md +0 -664
  46. data/.github/skills/command-yard-documentation/SKILL.md +0 -434
  47. data/.github/skills/dependency-management/SKILL.md +0 -72
  48. data/.github/skills/development-workflow/SKILL.md +0 -512
  49. data/.github/skills/facade-implementation/REFERENCE.md +0 -837
  50. data/.github/skills/facade-implementation/SKILL.md +0 -269
  51. data/.github/skills/facade-test-conventions/SKILL.md +0 -391
  52. data/.github/skills/facade-yard-documentation/SKILL.md +0 -435
  53. data/.github/skills/make-skill-template/SKILL.md +0 -226
  54. data/.github/skills/pr-readiness-review/SKILL.md +0 -205
  55. data/.github/skills/project-context/SKILL.md +0 -306
  56. data/.github/skills/pull-request-review/SKILL.md +0 -168
  57. data/.github/skills/rebase/SKILL.md +0 -148
  58. data/.github/skills/refactor-command-to-commandlineresult/SKILL.md +0 -131
  59. data/.github/skills/release-management/SKILL.md +0 -125
  60. data/.github/skills/resolve-feedback/SKILL.md +0 -288
  61. data/.github/skills/review-arguments-dsl/CHECKLIST.md +0 -788
  62. data/.github/skills/review-arguments-dsl/SKILL.md +0 -214
  63. data/.github/skills/review-cross-command-consistency/SKILL.md +0 -139
  64. data/.github/skills/reviewing-skills/SKILL.md +0 -214
  65. data/.github/skills/rspec-unit-testing-standards/SKILL.md +0 -685
  66. data/.github/skills/tdd-refactor-step/SKILL.md +0 -236
  67. data/.github/skills/test-debugging/SKILL.md +0 -161
  68. data/.github/skills/yard-documentation/SKILL.md +0 -981
  69. data/.github/skills/yard-documentation/element-rules.md +0 -162
  70. data/.github/skills-deprecated/README.md +0 -21
  71. data/.github/skills-deprecated/extract-command-from-lib/SKILL.md +0 -487
  72. data/.github/skills-deprecated/extract-facade-from-base-lib/KEYWORD_ARG_REMEDIATION.md +0 -22
  73. data/.github/skills-deprecated/extract-facade-from-base-lib/SKILL.md +0 -600
  74. data/.github/skills-deprecated/review-backward-compatibility/SKILL.md +0 -275
  75. data/.github/workflows/continuous_integration.yml +0 -358
  76. data/.github/workflows/enforce_conventional_commits.yml +0 -35
  77. data/.github/workflows/experimental_continuous_integration.yml +0 -59
  78. data/.github/workflows/release.yml +0 -52
  79. data/.github/workflows/warm_bundler_caches.yml +0 -82
  80. data/.gitignore +0 -30
  81. data/.husky/commit-msg +0 -1
  82. data/.husky/pre-commit +0 -13
  83. data/.release-please-config.json +0 -36
  84. data/.release-please-manifest.json +0 -3
  85. data/.rspec +0 -2
  86. data/.rubocop.yml +0 -44
  87. data/.rubocop_todo.yml +0 -30
  88. data/.yard-lint.yml +0 -75
  89. data/CLAUDE.md +0 -11
  90. data/Gemfile +0 -22
  91. data/Rakefile +0 -41
  92. data/docker/test/Dockerfile +0 -32
  93. data/docker/test/docker-compose.yml +0 -0
  94. data/package.json +0 -10
  95. data/redesign/1_architecture_existing.md +0 -102
  96. data/redesign/2_architecture_redesign.md +0 -449
  97. data/redesign/3_architecture_implementation.md +0 -1623
  98. data/redesign/Phase 4 - Step A.md +0 -366
  99. data/redesign/Phase 4 - Step B.md +0 -921
  100. data/redesign/Phase 4 - Step C.md +0 -833
  101. data/redesign/beta_release.md +0 -107
  102. data/redesign/branch_parse_refactor_plan.md +0 -163
  103. data/redesign/c1a-public-api-scope.tsv +0 -256
  104. data/redesign/c1c2_audit.md +0 -566
  105. data/redesign/c1c2_bucket6_lib_orphans.md +0 -626
  106. data/redesign/config_design.rb +0 -501
  107. data/redesign/index.md +0 -34
  108. data/redesign/info_object_migration_plan.md +0 -126
  109. data/redesign/integration_test_analysis.md +0 -521
  110. data/redesign/phase-4-step-b-test-audit.tsv +0 -485
  111. data/redesign/remote_refactor_plan.md +0 -164
  112. data/redesign/reverse_dependencies.sql +0 -44
  113. data/tasks/gem_tasks.rake +0 -14
  114. data/tasks/npm_tasks.rake +0 -7
  115. data/tasks/rspec.rake +0 -111
  116. data/tasks/rubocop.rake +0 -5
  117. data/tasks/test_gem.rake +0 -12
  118. data/tasks/yard.rake +0 -57
@@ -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