git 1.19.1 → 4.4.5

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 (76) hide show
  1. checksums.yaml +4 -4
  2. data/.commitlintrc.yml +38 -0
  3. data/.github/copilot-instructions.md +2733 -0
  4. data/.github/pull_request_template.md +17 -0
  5. data/.github/workflows/continuous_integration.yml +92 -21
  6. data/.github/workflows/enforce_conventional_commits.yml +29 -0
  7. data/.github/workflows/experimental_continuous_integration.yml +59 -0
  8. data/.github/workflows/release.yml +53 -0
  9. data/.gitignore +5 -0
  10. data/.husky/commit-msg +1 -0
  11. data/.release-please-manifest.json +3 -0
  12. data/.rubocop.yml +55 -0
  13. data/.rubocop_todo.yml +12 -0
  14. data/.yardopts +4 -1
  15. data/AI_POLICY.md +24 -0
  16. data/CHANGELOG.md +501 -0
  17. data/CODE_OF_CONDUCT.md +25 -0
  18. data/CONTRIBUTING.md +323 -102
  19. data/GOVERNANCE.md +106 -0
  20. data/LICENSE +1 -1
  21. data/MAINTAINERS.md +17 -4
  22. data/README.md +575 -246
  23. data/Rakefile +13 -55
  24. data/git.gemspec +36 -30
  25. data/lib/git/args_builder.rb +111 -0
  26. data/lib/git/author.rb +9 -7
  27. data/lib/git/base.rb +602 -173
  28. data/lib/git/branch.rb +318 -38
  29. data/lib/git/branches.rb +21 -24
  30. data/lib/git/command_line.rb +330 -0
  31. data/lib/git/command_line_result.rb +9 -3
  32. data/lib/git/config.rb +10 -6
  33. data/lib/git/diff.rb +149 -81
  34. data/lib/git/diff_path_status.rb +46 -0
  35. data/lib/git/diff_stats.rb +59 -0
  36. data/lib/git/errors.rb +212 -0
  37. data/lib/git/escaped_path.rb +2 -2
  38. data/lib/git/fsck_object.rb +48 -0
  39. data/lib/git/fsck_result.rb +121 -0
  40. data/lib/git/index.rb +2 -1
  41. data/lib/git/lib.rb +1648 -643
  42. data/lib/git/log.rb +143 -106
  43. data/lib/git/object.rb +151 -125
  44. data/lib/git/path.rb +23 -16
  45. data/lib/git/remote.rb +5 -4
  46. data/lib/git/repository.rb +2 -2
  47. data/lib/git/stash.rb +11 -12
  48. data/lib/git/stashes.rb +16 -15
  49. data/lib/git/status.rb +104 -143
  50. data/lib/git/url.rb +3 -3
  51. data/lib/git/version.rb +3 -1
  52. data/lib/git/working_directory.rb +2 -0
  53. data/lib/git/worktree.rb +6 -5
  54. data/lib/git/worktrees.rb +6 -6
  55. data/lib/git.rb +131 -28
  56. data/package.json +10 -0
  57. data/redesign/1_architecture_existing.md +66 -0
  58. data/redesign/2_architecture_redesign.md +130 -0
  59. data/redesign/3_architecture_implementation.md +138 -0
  60. data/redesign/index.md +34 -0
  61. data/release-please-config.json +36 -0
  62. data/tasks/gem_tasks.rake +10 -0
  63. data/tasks/rubocop.rake +12 -0
  64. data/tasks/test.rake +13 -0
  65. data/tasks/test_gem.rake +12 -0
  66. data/tasks/yard.rake +23 -0
  67. metadata +114 -37
  68. data/.github/stale.yml +0 -25
  69. data/Dockerfile.changelog-rs +0 -12
  70. data/PULL_REQUEST_TEMPLATE.md +0 -9
  71. data/RELEASING.md +0 -70
  72. data/lib/git/base/factory.rb +0 -99
  73. data/lib/git/failed_error.rb +0 -53
  74. data/lib/git/git_execute_error.rb +0 -7
  75. data/lib/git/signaled_error.rb +0 -50
  76. /data/{ISSUE_TEMPLATE.md → .github/issue_template.md} +0 -0
data/CONTRIBUTING.md CHANGED
@@ -3,161 +3,382 @@
3
3
  # @title How To Contribute
4
4
  -->
5
5
 
6
- # Contributing to ruby-git
7
-
8
- Thank you for your interest in contributing to the ruby-git project.
9
-
10
- This document gives the guidelines for contributing to the ruby-git project.
11
- These guidelines may not fit every situation. When contributing use your best
12
- judgement.
13
-
14
- Propose changes to these guidelines with a pull request.
6
+ # Contributing to the git gem
7
+
8
+ - [Summary](#summary)
9
+ - [How to contribute](#how-to-contribute)
10
+ - [How to report an issue or request a feature](#how-to-report-an-issue-or-request-a-feature)
11
+ - [How to submit a code or documentation change](#how-to-submit-a-code-or-documentation-change)
12
+ - [Commit your changes to a fork of `ruby-git`](#commit-your-changes-to-a-fork-of-ruby-git)
13
+ - [Create a pull request](#create-a-pull-request)
14
+ - [Get your pull request reviewed](#get-your-pull-request-reviewed)
15
+ - [Branch strategy](#branch-strategy)
16
+ - [AI-assisted contributions](#ai-assisted-contributions)
17
+ - [Design philosophy](#design-philosophy)
18
+ - [Direct mapping to git commands](#direct-mapping-to-git-commands)
19
+ - [Parameter naming](#parameter-naming)
20
+ - [Output processing](#output-processing)
21
+ - [Coding standards](#coding-standards)
22
+ - [Commit message guidelines](#commit-message-guidelines)
23
+ - [What does this mean for contributors?](#what-does-this-mean-for-contributors)
24
+ - [What to know about Conventional Commits](#what-to-know-about-conventional-commits)
25
+ - [Unit tests](#unit-tests)
26
+ - [Continuous integration](#continuous-integration)
27
+ - [Documentation](#documentation)
28
+ - [Building a specific version of the Git command-line](#building-a-specific-version-of-the-git-command-line)
29
+ - [Install pre-requisites](#install-pre-requisites)
30
+ - [Obtain Git source code](#obtain-git-source-code)
31
+ - [Build git](#build-git)
32
+ - [Use the new Git version](#use-the-new-git-version)
33
+ - [Licensing](#licensing)
34
+
35
+ ## Summary
36
+
37
+ Thank you for your interest in contributing to the `ruby-git` project.
38
+
39
+ This document provides guidelines for contributing to the `ruby-git` project. While
40
+ these guidelines may not cover every situation, we encourage you to use your best
41
+ judgment when contributing.
42
+
43
+ If you have suggestions for improving these guidelines, please propose changes via a
44
+ pull request.
45
+
46
+ Please also review and adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) when
47
+ participating in the project.
48
+ Governance and maintainer expectations are described in
49
+ [GOVERNANCE.md](GOVERNANCE.md).
15
50
 
16
51
  ## How to contribute
17
52
 
18
- You can contribute in two ways:
53
+ You can contribute in the following ways:
19
54
 
20
- 1. [Report an issue or make a feature request](#how-to-report-an-issue-or-make-a-feature-request)
21
- 2. [Submit a code or documentation change](#how-to-submit-a-code-or-documentation-change)
55
+ 1. [Report an issue or request a
56
+ feature](#how-to-report-an-issue-or-request-a-feature)
57
+ 2. [Submit a code or documentation
58
+ change](#how-to-submit-a-code-or-documentation-change)
22
59
 
23
- ## How to report an issue or make a feature request
60
+ ## How to report an issue or request a feature
24
61
 
25
- ruby-git utilizes [GitHub Issues](https://help.github.com/en/github/managing-your-work-on-github/about-issues)
62
+ `ruby-git` utilizes [GitHub
63
+ Issues](https://help.github.com/en/github/managing-your-work-on-github/about-issues)
26
64
  for issue tracking and feature requests.
27
65
 
28
- Report an issue or feature request by [creating a ruby-git Github issue](https://github.com/ruby-git/ruby-git/issues/new).
29
- Fill in the template to describe the issue or feature request the best you can.
66
+ To report an issue or request a feature, please [create a `ruby-git` GitHub
67
+ issue](https://github.com/ruby-git/ruby-git/issues/new). Fill in the template as
68
+ thoroughly as possible to describe the issue or feature request.
30
69
 
31
70
  ## How to submit a code or documentation change
32
71
 
33
- There is three step process for code or documentation changes:
72
+ There is a three-step process for submitting code or documentation changes:
34
73
 
35
- 1. [Commit your changes to a fork of ruby-git](#commit-changes-to-a-fork-of-ruby-git)
74
+ 1. [Commit your changes to a fork of
75
+ `ruby-git`](#commit-your-changes-to-a-fork-of-ruby-git) using [Conventional
76
+ Commits](#commit-message-guidelines)
36
77
  2. [Create a pull request](#create-a-pull-request)
37
78
  3. [Get your pull request reviewed](#get-your-pull-request-reviewed)
38
79
 
39
- ### Commit changes to a fork of ruby-git
80
+ ### Commit your changes to a fork of `ruby-git`
40
81
 
41
- Make your changes in a fork of the ruby-git repository.
42
-
43
- Each commit must include a [DCO sign-off](#developer-certificate-of-origin-dco)
44
- by adding the line `Signed-off-by: Name <email>` to the end of the commit
45
- message.
82
+ Make your changes in a fork of the `ruby-git` repository.
46
83
 
47
84
  ### Create a pull request
48
85
 
49
- See [this article](https://help.github.com/articles/about-pull-requests/) if you
50
- are not familiar with GitHub Pull Requests.
86
+ If you are not familiar with GitHub Pull Requests, please refer to [this
87
+ article](https://help.github.com/articles/about-pull-requests/).
51
88
 
52
89
  Follow the instructions in the pull request template.
53
90
 
54
91
  ### Get your pull request reviewed
55
92
 
56
- Code review takes place in a GitHub pull request using the [the Github pull request review feature](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-request-reviews).
93
+ Code review takes place in a GitHub pull request using the [GitHub pull request
94
+ review
95
+ feature](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-request-reviews).
57
96
 
58
97
  Once your pull request is ready for review, request a review from at least one
59
- [maintainer](MAINTAINERS.md) and any number of other contributors.
98
+ [maintainer](MAINTAINERS.md) and any other contributors you deem necessary.
99
+
100
+ During the review process, you may need to make additional commits, which should be
101
+ squashed. Additionally, you will need to rebase your branch to the latest version of
102
+ the target branch (e.g., `main` or `4.x`) before merging.
103
+
104
+ At least one approval from a project maintainer is required before your pull request
105
+ can be merged. The maintainer is responsible for ensuring that the pull request meets
106
+ [the project's coding standards](#coding-standards).
107
+
108
+ ## Branch strategy
109
+
110
+ This project maintains two active branches:
111
+
112
+ - **`main`**: Active development for the next major version (v5.0.0+). This branch
113
+ may contain breaking changes.
114
+ - **`4.x`**: Maintenance branch for the v4.x release series. This branch receives
115
+ bug fixes and backward-compatible improvements only.
116
+
117
+ **Important:** Never commit directly to `main` or `4.x`. All changes must be
118
+ submitted via pull requests from feature branches. This ensures proper code review,
119
+ CI validation, and maintains a clean commit history.
120
+
121
+ When submitting a pull request:
122
+
123
+ - **New features and breaking changes**: Target the `main` branch
124
+ - **Bug fixes**: Target `main`, and maintainers will backport to `4.x` if applicable
125
+ - **Security fixes**: Target both branches or `4.x` if the issue only affects v4.x
126
+
127
+ ## AI-assisted contributions
128
+
129
+ AI-assisted contributions are welcome. Please review and apply our [AI Policy](AI_POLICY.md)
130
+ before submitting changes. You are responsible for understanding and verifying any
131
+ AI-assisted work included in PRs and ensuring it meets our standards for quality,
132
+ security, and licensing.
133
+
134
+ ## Design philosophy
135
+
136
+ *Note: As of v2.x of the `git` gem, this design philosophy is aspirational. Future
137
+ versions may include interface changes to fully align with these principles.*
138
+
139
+ The `git` gem is designed as a lightweight wrapper around the `git` command-line
140
+ tool, providing Ruby developers with a simple and intuitive interface for
141
+ programmatically interacting with Git.
142
+
143
+ This gem adheres to the "principle of least surprise," ensuring that it does not
144
+ introduce unnecessary abstraction layers or modify Git's core functionality. Instead,
145
+ the gem maintains a close alignment with the existing `git` command-line interface,
146
+ avoiding extensions or alterations that could lead to unexpected behaviors.
147
+
148
+ By following this philosophy, the `git` gem allows users to leverage their existing
149
+ knowledge of Git while benefiting from the expressiveness and power of Ruby's syntax
150
+ and paradigms.
151
+
152
+ ### Direct mapping to git commands
60
153
 
61
- During the review process, you may need to make additional commits which would
62
- need to be squashed. It may also be necessary to rebase to master again if other
63
- changes are merged before your PR.
154
+ Git commands are implemented within the `Git::Base` class, with each method directly
155
+ corresponding to a `git` command. When a `Git::Base` object is instantiated via
156
+ `Git.open`, `Git.clone`, or `Git.init`, the user can invoke these methods to interact
157
+ with the underlying Git repository.
64
158
 
65
- At least one approval is required from a project maintainer before your pull
66
- request can be merged. The maintainer is responsible for ensuring that the pull
67
- request meets [the project's coding standards](#coding-standards).
159
+ For example, the `git add` command is implemented as `Git::Base#add`, and the `git
160
+ ls-files` command is implemented as `Git::Base#ls_files`.
161
+
162
+ When a single Git command serves multiple distinct purposes, method names within the
163
+ `Git::Base` class should use the `git` command name as a prefix, followed by a
164
+ descriptive suffix to indicate the specific function.
165
+
166
+ For instance, `#ls_files_untracked` and `#ls_files_staged` could be used to execute
167
+ the `git ls-files` command and return untracked and staged files, respectively.
168
+
169
+ To enhance usability, aliases may be introduced to provide more user-friendly method
170
+ names where appropriate.
171
+
172
+ ### Parameter naming
173
+
174
+ Parameters within the `git` gem methods are named after their corresponding long
175
+ command-line options, ensuring familiarity and ease of use for developers already
176
+ accustomed to Git. Note that not all Git command options are supported.
177
+
178
+ ### Output processing
179
+
180
+ The `git` gem translates the output of many Git commands into Ruby objects, making it
181
+ easier to work with programmatically.
182
+
183
+ These Ruby objects often include methods that allow for further Git operations where
184
+ useful, providing additional functionality while staying true to the underlying Git
185
+ behavior.
68
186
 
69
187
  ## Coding standards
70
188
 
71
- In order to ensure high quality, all pull requests must meet these requirements:
189
+ To ensure high-quality contributions, all pull requests must meet the following
190
+ requirements:
191
+
192
+ ### Commit message guidelines
193
+
194
+ To enhance our development workflow, enable automated changelog generation, and pave
195
+ the way for Continuous Delivery, the `ruby-git` project has adopted the [Conventional
196
+ Commits standard](https://www.conventionalcommits.org/en/v1.0.0/) for all commit
197
+ messages.
198
+
199
+ This structured approach to commit messages allows us to:
200
+
201
+ - **Automate versioning and releases:** Tools can now automatically determine the
202
+ semantic version bump (patch, minor, major) based on the types of commits merged.
203
+ - **Generate accurate changelogs:** We can automatically create and update a
204
+ `CHANGELOG.md` file, providing a clear history of changes for users and
205
+ contributors.
206
+ - **Improve commit history readability:** A standardized format makes it easier for
207
+ everyone to understand the nature of changes at a glance.
208
+
209
+ #### What does this mean for contributors?
210
+
211
+ Going forward, all commits to this repository **MUST** adhere to the [Conventional
212
+ Commits standard](https://www.conventionalcommits.org/en/v1.0.0/). Commits not
213
+ adhering to this standard will cause the CI build to fail. PRs will not be merged if
214
+ they include non-conventional commits.
215
+
216
+ A git pre-commit hook may be installed to validate your conventional commit messages
217
+ before pushing them to GitHub by running `bin/setup` in the project root.
218
+
219
+ #### What to know about Conventional Commits
220
+
221
+ The simplist conventional commit is in the form `type: description` where `type`
222
+ indicates the type of change and `description` is your usual commit message (with
223
+ some limitations).
224
+
225
+ - Types include: `feat`, `fix`, `docs`, `test`, `refactor`, and `chore`. See the full
226
+ list of types supported in [.commitlintrc.yml](.commitlintrc.yml).
227
+ - The description must (1) not start with an upper case letter, (2) be no more than
228
+ 100 characters, and (3) not end with punctuation.
229
+
230
+ Examples of valid commits:
231
+
232
+ - `feat: add the --merges option to Git::Lib.log`
233
+ - `fix: exception thrown by Git::Lib.log when repo has no commits`
234
+ - `docs: add conventional commit announcement to README.md`
72
235
 
73
- ### 1 PR = 1 Commit
74
- * All commits for a PR must be squashed into one commit
75
- * To avoid an extra merge commit, the PR must be able to be merged as [a fast forward merge](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)
76
- * The easiest way to ensure a fast forward merge is to rebase your local branch
77
- to the ruby-git master branch
236
+ Commits that include breaking changes must include an exclaimation mark before the
237
+ colon:
238
+
239
+ - `feat!: removed Git::Base.commit_force`
240
+
241
+ The commit messages will drive how the version is incremented for each release:
242
+
243
+ - a release containing a **breaking change** will do a **major** version increment
244
+ - a release containing a **new feature** will do a **minor** increment
245
+ - a release containing **neither a breaking change nor a new feature** will do a
246
+ **patch** version increment
247
+
248
+ The full conventional commit format is:
249
+
250
+ ```text
251
+ <type>[optional scope][!]: <description>
252
+
253
+ [optional body]
254
+
255
+ [optional footer(s)]
256
+ ```
257
+
258
+ - `optional body` may include multiple lines of descriptive text limited to 100 chars
259
+ each
260
+ - `optional footers` only uses `BREAKING CHANGE: <description>` where description
261
+ should describe the nature of the backward incompatibility.
262
+
263
+ Use of the `BREAKING CHANGE:` footer flags a backward incompatible change even if it
264
+ is not flagged with an exclaimation mark after the `type`. Other footers are allowed
265
+ by not acted upon.
266
+
267
+ See [the Conventional Commits
268
+ specification](https://www.conventionalcommits.org/en/v1.0.0/) for more details.
78
269
 
79
270
  ### Unit tests
80
- * All changes must be accompanied by new or modified unit tests
81
- * The entire test suite must pass when `bundle exec rake default` is run from the
82
- project's local working copy.
83
271
 
84
- While working on specific features you can run individual test files or
85
- a group of tests using `bin/test`:
272
+ - All changes must be accompanied by new or modified unit tests.
273
+ - The entire test suite must pass when `bundle exec rake default` is run from the
274
+ project's local working copy.
275
+
276
+ While working on specific features, you can run individual test files or a group of
277
+ tests using `bin/test`:
86
278
 
87
- # run a single file (from tests/units):
88
- $ bin/test test_object
279
+ ```bash
280
+ # run a single file (from tests/units):
281
+ $ bin/test test_object
89
282
 
90
- # run multiple files:
91
- $ bin/test test_object test_archive
283
+ # run multiple files:
284
+ $ bin/test test_object test_archive
92
285
 
93
- # run all unit tests:
94
- $ bin/test
286
+ # run all unit tests:
287
+ $ bin/test
288
+
289
+ # run unit tests with a different version of the git command line:
290
+ $ GIT_PATH=/Users/james/Downloads/git-2.30.2/bin-wrappers bin/test
291
+ ```
95
292
 
96
293
  ### Continuous integration
97
- * All tests must pass in the project's [GitHub Continuous Integration build](https://github.com/ruby-git/ruby-git/actions?query=workflow%3ACI)
98
- before the pull request will be merged.
99
- * The [Continuous Integration workflow](https://github.com/ruby-git/ruby-git/blob/master/.github/workflows/continuous_integration.yml)
100
- runs both `bundle exec rake default` and `bundle exec rake test:gem` from the project's [Rakefile](https://github.com/ruby-git/ruby-git/blob/master/Rakefile).
294
+
295
+ All tests must pass in the project's [GitHub Continuous Integration
296
+ build](https://github.com/ruby-git/ruby-git/actions?query=workflow%3ACI) before the
297
+ pull request will be merged.
298
+
299
+ The [Continuous Integration
300
+ workflow](https://github.com/ruby-git/ruby-git/blob/master/.github/workflows/continuous_integration.yml)
301
+ runs both `bundle exec rake default` and `bundle exec rake test:gem` from the
302
+ project's [Rakefile](https://github.com/ruby-git/ruby-git/blob/master/Rakefile).
101
303
 
102
304
  ### Documentation
103
- * New and updated public methods must have [YARD](https://yardoc.org/)
104
- documentation added to them
105
- * New and updated public facing features should be documented in the project's
106
- [README.md](README.md)
107
305
 
108
- ### Licensing sign-off
109
- * Each commit must contain [the DCO sign-off](#developer-certificate-of-origin-dco)
110
- in the form: `Signed-off-by: Name <email>`
306
+ New and updated public methods must include [YARD](https://yardoc.org/)
307
+ documentation.
111
308
 
112
- ## Licensing
309
+ New and updated public-facing features should be documented in the project's
310
+ [README.md](README.md).
113
311
 
114
- ruby-git uses [the MIT license](https://choosealicense.com/licenses/mit/) as
115
- declared in the [LICENSE](LICENSE) file.
312
+ ## Building a specific version of the Git command-line
116
313
 
117
- Licensing is very important to open source projects. It helps ensure the
118
- software continues to be available under the terms that the author desired.
314
+ To test with a specific version of the Git command-line, you may need to build that
315
+ version from source code. The following instructions are adapted from Atlassian’s
316
+ [How to install Git](https://www.atlassian.com/git/tutorials/install-git) page for
317
+ building Git on macOS.
119
318
 
120
- ### Developer Certificate of Origin (DCO)
319
+ ### Install pre-requisites
121
320
 
122
- This project requires that authors have permission to submit their contributions
123
- under the MIT license. To make a good faith effort to ensure this, ruby-git
124
- requires the [Developer Certificate of Origin (DCO)](https://elinux.org/Developer_Certificate_Of_Origin)
125
- process be followed.
321
+ Prerequisites only need to be installed if they are not already present.
126
322
 
127
- This process requires that each commit include a `Signed-off-by` line that
128
- indicates the author accepts the DCO. Here is an example DCO sign-off line:
323
+ From your terminal, install Xcode’s Command Line Tools:
129
324
 
325
+ ```shell
326
+ xcode-select --install
130
327
  ```
131
- Signed-off-by: John Doe <john.doe@hisdomain.com>
328
+
329
+ Install [Homebrew](http://brew.sh/) by following the instructions on the Homebrew
330
+ page.
331
+
332
+ Using Homebrew, install OpenSSL:
333
+
334
+ ```shell
335
+ brew install openssl
132
336
  ```
133
337
 
134
- The full text of the DCO version 1.1 is below or at <http://developercertificate.org/>.
338
+ ### Obtain Git source code
339
+
340
+ Download and extract the source tarball for the desired Git version from [this source
341
+ code mirror](https://mirrors.edge.kernel.org/pub/software/scm/git/).
342
+
343
+ ### Build git
135
344
 
345
+ From your terminal, change to the root directory of the extracted source code and run
346
+ the build with following command:
347
+
348
+ ```shell
349
+ NO_GETTEXT=1 make CFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib"
136
350
  ```
137
- Developer's Certificate of Origin 1.1
138
-
139
- By making a contribution to this project, I certify that:
140
-
141
- (a) The contribution was created in whole or in part by me and I
142
- have the right to submit it under the open source license
143
- indicated in the file; or
144
-
145
- (b) The contribution is based upon previous work that, to the
146
- best of my knowledge, is covered under an appropriate open
147
- source license and I have the right under that license to
148
- submit that work with modifications, whether created in whole
149
- or in part by me, under the same open source license (unless
150
- I am permitted to submit under a different license), as
151
- Indicated in the file; or
152
-
153
- (c) The contribution was provided directly to me by some other
154
- person who certified (a), (b) or (c) and I have not modified
155
- it.
156
-
157
- (d) I understand and agree that this project and the contribution
158
- are public and that a record of the contribution (including
159
- all personal information I submit with it, including my
160
- sign-off) is maintained indefinitely and may be redistributed
161
- consistent with this project or the open source license(s)
162
- involved.
351
+
352
+ The build script will place the newly compiled Git executables in the `bin-wrappers`
353
+ directory (e.g., `bin-wrappers/git`).
354
+
355
+ ### Use the new Git version
356
+
357
+ To configure programs that use the Git gem to utilize the newly built version, do the
358
+ following:
359
+
360
+ ```ruby
361
+ require 'git'
362
+
363
+ # Set the binary path
364
+ Git.configure { |c| c.binary_path = '/Users/james/Downloads/git-2.30.2/bin-wrappers/git' }
365
+
366
+ # Validate the version (if desired)
367
+ assert_equal([2, 30, 2], Git.binary_version)
163
368
  ```
369
+
370
+ Tests can be run using the newly built Git version as follows:
371
+
372
+ ```shell
373
+ GIT_PATH=/Users/james/Downloads/git-2.30.2/bin-wrappers bin/test
374
+ ```
375
+
376
+ Note: `GIT_PATH` refers to the directory containing the `git` executable.
377
+
378
+ ## Licensing
379
+
380
+ `ruby-git` uses [the MIT license](https://choosealicense.com/licenses/mit/) as
381
+ declared in the [LICENSE](LICENSE) file.
382
+
383
+ Licensing is critical to open-source projects as it ensures the software remains
384
+ available under the terms desired by the author.
data/GOVERNANCE.md ADDED
@@ -0,0 +1,106 @@
1
+ <!--
2
+ # @markup markdown
3
+ # @title Governance
4
+ -->
5
+
6
+ # Governance
7
+
8
+ This document explains how we steward the project with a light, principles-first
9
+ approach: enable trusted people, minimize dormant access, and keep decisions
10
+ transparent.
11
+
12
+ ## Roles
13
+
14
+ A **Maintainer** is a trusted leader with write access who stewards the project's
15
+ health and direction. Responsibilities center on triage, review, merge, and
16
+ helping the community stay unblocked.
17
+
18
+ A **Project Lead** is a maintainer with additional administrative scope (repo
19
+ Admin, org Owner). They handle settings, secrets, access, and tie-breaks when
20
+ needed.
21
+
22
+ ## Becoming a Maintainer
23
+
24
+ Maintainers invite contributors who consistently ship, review, and model our
25
+ values to become maintainers. Anyone can nominate themselves or others in an
26
+ issue or via a private note. Current maintainers discuss nominations (see
27
+ [Decision Making](#decision-making)) with a focus on contribution quality,
28
+ alignment with project goals, and communication style.
29
+
30
+ ## Access Principles
31
+
32
+ - Stewardship: Maintainer access exists to keep the project healthy and responsive.
33
+ - Least privilege: Elevated access is temporary and kept only while it’s needed.
34
+ - Continuity: Dormant access is paused to protect the project and unblock
35
+ contributors.
36
+ - Respect: Status changes are transparent, reversible, and acknowledge past
37
+ contributions.
38
+
39
+ ## How We Apply Them
40
+
41
+ - Staying active: Maintainers keep elevated access while participating (shipping,
42
+ reviewing, triaging, or governance).
43
+ - When access is paused: If there’s no project activity for about a year, we’ll
44
+ check in. If we don’t hear back after a short window, we move the maintainer to
45
+ Emeritus and pause Owner/Admin/Write/package access (including CODEOWNERS
46
+ entries).
47
+ - Coming back: Emeritus maintainers can be re-added quickly after a brief period of
48
+ renewed participation to refresh context.
49
+ - Recognition: Emeritus maintainers remain listed to honor prior contributions.
50
+
51
+ Access changes are communicated openly (e.g., PRs or issues) and reflected in the
52
+ Maintainers list.
53
+
54
+ ## Decision Making
55
+
56
+ Decisions are usually made by consensus among the active maintainers. If consensus
57
+ cannot be reached, the decision is made by a majority vote. If a vote results in a
58
+ tie, the Project Lead has the final say.
59
+
60
+ ## Continuity
61
+
62
+ The project must be able to ship releases and respond to security issues even if
63
+ individual maintainers become unavailable.
64
+
65
+ ### RubyGems Ownership
66
+
67
+ RubyGems ownership (the ability to push new gem versions) is granted to a subset
68
+ of active maintainers—typically the Project Lead and at least one other
69
+ maintainer—to balance security with continuity. Not all maintainers require
70
+ RubyGems access.
71
+
72
+ RubyGems owners follow the same activity principles as other elevated access: if
73
+ an owner becomes inactive, their ownership is paused alongside other permissions.
74
+
75
+ ### Minimum Thresholds
76
+
77
+ To avoid single points of failure:
78
+
79
+ - At least two active maintainers should have RubyGems ownership for the `git` gem.
80
+ - At least two active maintainers should have GitHub org Owner or repo Admin
81
+ access.
82
+
83
+ If thresholds drop below these levels, remaining maintainers should prioritize
84
+ onboarding or re-activating someone to restore redundancy.
85
+
86
+ ### Access Audits
87
+
88
+ Periodically (at least annually), maintainers review access across all systems:
89
+
90
+ - GitHub organization membership and roles
91
+ - GitHub repository admin/write permissions
92
+ - RubyGems gem ownership
93
+ - GitHub Actions release automation: PATs/OIDC tokens (e.g., `AUTO_RELEASE_TOKEN` scope),
94
+ environment protection rules/approvers for RubyGems deployments, and any OIDC
95
+ trust configuration
96
+
97
+ The Project Lead (or a delegated maintainer) schedules and drives this review so
98
+ continuity checks do not slip.
99
+
100
+ Audits ensure access reflects current activity and that continuity thresholds are
101
+ met.
102
+
103
+ ## Code of Conduct
104
+
105
+ All maintainers and contributors must adhere to the project's [Code of
106
+ Conduct](./CODE_OF_CONDUCT.md).
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2008 Scott Chacon
3
+ Copyright (c) 2008 Scott Chacon, 2020 James Couball, and the ruby-git contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/MAINTAINERS.md CHANGED
@@ -5,8 +5,21 @@
5
5
 
6
6
  # Maintainers
7
7
 
8
- When making changes in this repository, one of the maintainers below must review and approve your pull request.
8
+ See [GOVERNANCE.md](GOVERNANCE.md) for a definition of the Maintainer role.
9
9
 
10
- * [James Couball](https://github.com/jcouball)
11
- * [Frank Throckmorton](https://github.com/frankthrock)
12
- * [Per Lundberg](https://github.com/perlun)
10
+ ## Active Maintainers
11
+
12
+ - [James Couball](https://github.com/jcouball) (Project Lead)
13
+ - [Frank Throckmorton](https://github.com/frankthrock)
14
+
15
+ ## Maintainers Emeritus (Alumni)
16
+
17
+ **Maintainers Emeritus** are former maintainers who are no longer active. We honor
18
+ their past contributions.
19
+
20
+ - [Per Lundberg](https://github.com/perlun)
21
+ - [Vern Burton](https://github.com/tarcinil)
22
+ - [Daniel Perez](https://github.com/dpmex4527)
23
+ - [Richard Vodden](https://github.com/rvodden)
24
+ - [Roberto Decurnex](https://github.com/robertodecurnex)
25
+ - [Scott Chacon](https://github.com/schacon) (original creator)