git 4.0.7 → 4.1.1
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.
- checksums.yaml +4 -4
- data/.github/copilot-instructions.md +2212 -330
- data/.github/pull_request_template.md +12 -3
- data/.release-please-manifest.json +1 -1
- data/.rubocop_todo.yml +1 -1
- data/.yardopts +4 -0
- data/AI_POLICY.md +24 -0
- data/CHANGELOG.md +35 -0
- data/CODE_OF_CONDUCT.md +25 -0
- data/CONTRIBUTING.md +13 -0
- data/GOVERNANCE.md +63 -0
- data/MAINTAINERS.md +16 -4
- data/README.md +419 -315
- data/lib/git/base.rb +83 -10
- data/lib/git/diff.rb +40 -2
- data/lib/git/diff_path_status.rb +1 -1
- data/lib/git/lib.rb +190 -14
- data/lib/git/log.rb +6 -1
- data/lib/git/version.rb +1 -1
- data/lib/git.rb +39 -0
- metadata +6 -3
|
@@ -1,8 +1,17 @@
|
|
|
1
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
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
- Write tests for your changes
|
|
4
|
+
- Run `rake` before pushing
|
|
5
|
+
- Include / update docs in the README.md and in YARD documentation
|
|
6
6
|
|
|
7
7
|
# Description
|
|
8
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
|
+
- [ ] Tests added/updated as needed and `rake` passes locally.
|
|
17
|
+
- [ ] Documentation updated where applicable (README and/or YARD).
|
data/.rubocop_todo.yml
CHANGED
data/.yardopts
CHANGED
data/AI_POLICY.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
# @markup markdown
|
|
3
|
+
# @title AI Policy
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
# AI Policy
|
|
7
|
+
|
|
8
|
+
AI assisted contributions are welcome in this project.
|
|
9
|
+
|
|
10
|
+
Reviewing and maintaining code requires human insight. While AI tools can be helpful
|
|
11
|
+
assistants, they are no substitute for human judgment and creativity.
|
|
12
|
+
|
|
13
|
+
We value the unique perspectives and critical thinking that our contributors bring.
|
|
14
|
+
If you use AI tools to assist your work:
|
|
15
|
+
|
|
16
|
+
1. **You are responsible**: You must review and understand every line of code or text
|
|
17
|
+
you submit.
|
|
18
|
+
2. **Focus on quality**: Ensure that AI-generated content meets our standards for
|
|
19
|
+
correctness, readability, and security, and respects all licensing requirements.
|
|
20
|
+
3. **Be transparent**: We encourage you to disclose if significant portions of your
|
|
21
|
+
contribution were AI-generated.
|
|
22
|
+
|
|
23
|
+
Ultimately, the quality of this project depends on *your* expertise. Use tools
|
|
24
|
+
wisely, but lead with your own intelligence.
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,41 @@
|
|
|
5
5
|
|
|
6
6
|
# Change Log
|
|
7
7
|
|
|
8
|
+
## [4.1.1](https://github.com/ruby-git/ruby-git/compare/v4.1.0...v4.1.1) (2026-01-09)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Other Changes
|
|
12
|
+
|
|
13
|
+
* Add AI Policy and update documentation ([8616cdf](https://github.com/ruby-git/ruby-git/commit/8616cdf7c6cfd1a3f2ccb931f59367b0fdfa36d1))
|
|
14
|
+
* Add code of conduct links ([0769c8e](https://github.com/ruby-git/ruby-git/commit/0769c8ede791a2578291fa301d74144bc7fb2bfb))
|
|
15
|
+
* Add governance policy and update project policies ([8d8263c](https://github.com/ruby-git/ruby-git/commit/8d8263c8395ff4e127b7dc6eb25b0371c272593a))
|
|
16
|
+
* Add Quick Start section and reorganize README for new users ([1811a75](https://github.com/ruby-git/ruby-git/commit/1811a75e4b0b8b8233988d38a411ba585f35c044))
|
|
17
|
+
* Clarify JRuby on Windows support policy ([c37b3d6](https://github.com/ruby-git/ruby-git/commit/c37b3d6c256cdc925578c7ff198f6b351dcb5844))
|
|
18
|
+
|
|
19
|
+
## [4.1.0](https://github.com/ruby-git/ruby-git/compare/v4.0.7...v4.1.0) (2026-01-02)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* Add per-instance git_ssh configuration support ([26c1199](https://github.com/ruby-git/ruby-git/commit/26c119969ec71c23c965f55f0570471f8ddf333a))
|
|
25
|
+
* **clone:** Add single_branch option ([a6929bb](https://github.com/ruby-git/ruby-git/commit/a6929bb0bfd51cba3a595e47740897ca619da468))
|
|
26
|
+
* **diff:** Allow multiple paths in diff path limiter ([c663b62](https://github.com/ruby-git/ruby-git/commit/c663b62a0c9075a18c112e2cda3744f88f42ab7e))
|
|
27
|
+
* **remote:** Add remote set-branches helper ([a7dab2b](https://github.com/ruby-git/ruby-git/commit/a7dab2bdf9088f0610dfbf3e3b78677b90195f75))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* Prevent GIT_INDEX_FILE from corrupting worktree indexes ([27c0f16](https://github.com/ruby-git/ruby-git/commit/27c0f1629927ae23a5bb8efc4df79756a9e4406b))
|
|
33
|
+
* **test:** Use larger timeout values on JRuby to prevent flaky tests ([aa8fd8b](https://github.com/ruby-git/ruby-git/commit/aa8fd8b0435246f70579bfab3cde8d45bc23233a))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Other Changes
|
|
37
|
+
|
|
38
|
+
* Add git version support policy ([fbb0c60](https://github.com/ruby-git/ruby-git/commit/fbb0c60c56a01222133b61eb5267148773b4239c))
|
|
39
|
+
* **clone:** Simplify single_branch validator ([3900233](https://github.com/ruby-git/ruby-git/commit/39002330d42c4a2b3f0413ba920e6fd534880e03))
|
|
40
|
+
* Expand AI instructions with comprehensive workflows ([04907ed](https://github.com/ruby-git/ruby-git/commit/04907edd89dd716d85f190d828cbf6a0c43d47f6))
|
|
41
|
+
* Make env_overrides more flexible and idiomatic ([dc0b43b](https://github.com/ruby-git/ruby-git/commit/dc0b43bccbc9c57c445efc303a3e0f6a71cbd66f))
|
|
42
|
+
|
|
8
43
|
## [4.0.7](https://github.com/ruby-git/ruby-git/compare/v4.0.6...v4.0.7) (2025-12-29)
|
|
9
44
|
|
|
10
45
|
|
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
# @markup markdown
|
|
3
|
+
# @title Code of Conduct
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
# Code of Conduct
|
|
7
|
+
|
|
8
|
+
ℹ️ We have adopted the [Ruby code of conduct](https://www.ruby-lang.org/en/conduct/).
|
|
9
|
+
|
|
10
|
+
This document provides community guidelines for a safe, respectful, productive, and
|
|
11
|
+
collaborative place for any person who is willing to contribute to the Ruby
|
|
12
|
+
community. It applies to all “collaborative space”, which is defined as community
|
|
13
|
+
communications channels (such as mailing lists, submitted patches, commit comments,
|
|
14
|
+
etc.).
|
|
15
|
+
|
|
16
|
+
- Participants will be tolerant of opposing views.
|
|
17
|
+
- Participants must ensure that their language and actions are free of personal
|
|
18
|
+
attacks and disparaging personal remarks.
|
|
19
|
+
- When interpreting the words and actions of others, participants should always
|
|
20
|
+
assume good intentions.
|
|
21
|
+
- Behavior which can be reasonably considered harassment will not be tolerated.
|
|
22
|
+
|
|
23
|
+
Report violations to the maintainers by [opening an
|
|
24
|
+
issue](https://github.com/ruby-git/ruby-git/issues/new) or contacting a
|
|
25
|
+
[maintainer](MAINTAINERS.md) privately.
|
data/CONTRIBUTING.md
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
- [Commit your changes to a fork of `ruby-git`](#commit-your-changes-to-a-fork-of-ruby-git)
|
|
13
13
|
- [Create a pull request](#create-a-pull-request)
|
|
14
14
|
- [Get your pull request reviewed](#get-your-pull-request-reviewed)
|
|
15
|
+
- [AI-assisted contributions](#ai-assisted-contributions)
|
|
15
16
|
- [Design philosophy](#design-philosophy)
|
|
16
17
|
- [Direct mapping to git commands](#direct-mapping-to-git-commands)
|
|
17
18
|
- [Parameter naming](#parameter-naming)
|
|
@@ -41,6 +42,11 @@ judgment when contributing.
|
|
|
41
42
|
If you have suggestions for improving these guidelines, please propose changes via a
|
|
42
43
|
pull request.
|
|
43
44
|
|
|
45
|
+
Please also review and adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) when
|
|
46
|
+
participating in the project.
|
|
47
|
+
Governance and maintainer expectations are described in
|
|
48
|
+
[GOVERNANCE.md](GOVERNANCE.md).
|
|
49
|
+
|
|
44
50
|
## How to contribute
|
|
45
51
|
|
|
46
52
|
You can contribute in the following ways:
|
|
@@ -98,6 +104,13 @@ At least one approval from a project maintainer is required before your pull req
|
|
|
98
104
|
can be merged. The maintainer is responsible for ensuring that the pull request meets
|
|
99
105
|
[the project's coding standards](#coding-standards).
|
|
100
106
|
|
|
107
|
+
## AI-assisted contributions
|
|
108
|
+
|
|
109
|
+
AI-assisted contributions are welcome. Please review and apply our [AI Policy](AI_POLICY.md)
|
|
110
|
+
before submitting changes. You are responsible for understanding and verifying any
|
|
111
|
+
AI-assisted work included in PRs and ensuring it meets our standards for quality,
|
|
112
|
+
security, and licensing.
|
|
113
|
+
|
|
101
114
|
## Design philosophy
|
|
102
115
|
|
|
103
116
|
*Note: As of v2.x of the `git` gem, this design philosophy is aspirational. Future
|
data/GOVERNANCE.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
## Code of Conduct
|
|
61
|
+
|
|
62
|
+
All maintainers and contributors must adhere to the project's [Code of
|
|
63
|
+
Conduct](./CODE_OF_CONDUCT.md).
|
data/MAINTAINERS.md
CHANGED
|
@@ -5,8 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
# Maintainers
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
See [GOVERNANCE.md](GOVERNANCE.md) for a definition of the Maintainer role.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
## Active Maintainers
|
|
11
|
+
|
|
12
|
+
- [James Couball](https://github.com/jcouball) (Project Lead)
|
|
13
|
+
- [Frank Throckmorton](https://github.com/frankthrock)
|
|
14
|
+
- [Per Lundberg](https://github.com/perlun)
|
|
15
|
+
|
|
16
|
+
## Maintainers Emeritus (Alumni)
|
|
17
|
+
|
|
18
|
+
**Maintainers Emeritus** are former maintainers who are no longer active. We honor
|
|
19
|
+
their past contributions.
|
|
20
|
+
|
|
21
|
+
- [Vern Burton](https://github.com/tarcinil)
|
|
22
|
+
- [Daniel Perez](https://github.com/dpmex4527)
|
|
23
|
+
- [Richard Vodden](https://github.com/rvodden)
|
|
24
|
+
- [Scott Chacon](https://github.com/schacon)
|