git 3.1.0 → 3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 511ce73ebd49de3ef2985b430f6aef69828bef58f15f4272ff835328b1275fc3
4
- data.tar.gz: a223cc03fef4b9968b5ff30ba2521ab841e9c4e15e311dbb7d94bec16b466373
3
+ metadata.gz: 8ea6b964531a2d91cdc46c4e4c7a6d9f79251f246f2c8856c271b989c6d22800
4
+ data.tar.gz: 3fd581082807719899cdbe85eea5ca8eca35803402f6822c66bd5b95b27de10b
5
5
  SHA512:
6
- metadata.gz: 8bb93e9a89b396c30ed1ce535baa972a9d52a9c8afe63cbdee55520881cb9d0921eb85cea447779ee78469812a3b939de8a9a47a10996f47502e8bf1bd9cdb05
7
- data.tar.gz: d9b075c42d95fd121986e3a79fc87acbd634aefa06228a139104ac189c7258351ee88a4607638184d92f03668d67253412b39d50a9a8994c63943b38353d2f8a
6
+ metadata.gz: ae34ed0370f1ac66b68c03e13ef16d9415e531f3ebe0b7af906dc6d9150c4fc0eec63da7dde987530f7a24bf17966cb3053b40723e0056c78652763340b8e71c
7
+ data.tar.gz: ec675f610d8d193dac8c0debca9de1480d154b3d09c34e172dbb0e68d7a47625fdcb7d8bef7a5625e3fef8dfd10e029e1ff682ee033b698beebae43414b3454f
@@ -1,4 +1,4 @@
1
- Review our [guidelines for contributing](https://github.com/ruby-git/ruby-git/blob/master/CONTRIBUTING.md) to this repository. A good start is to:
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
3
  * Write tests for your changes
4
4
  * Run `rake` before pushing
@@ -2,7 +2,7 @@ name: CI
2
2
 
3
3
  on:
4
4
  pull_request:
5
- branches: [master]
5
+ branches: [main]
6
6
  workflow_dispatch:
7
7
 
8
8
  jobs:
@@ -7,7 +7,7 @@ permissions:
7
7
  on:
8
8
  pull_request:
9
9
  branches:
10
- - master
10
+ - main
11
11
 
12
12
  jobs:
13
13
  commit-lint:
@@ -2,7 +2,7 @@ name: CI Experimental
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [master]
5
+ branches: [main]
6
6
 
7
7
  workflow_dispatch:
8
8
 
@@ -11,7 +11,7 @@ description: |
11
11
 
12
12
  on:
13
13
  push:
14
- branches: ["master"]
14
+ branches: ["main"]
15
15
 
16
16
  workflow_dispatch:
17
17
 
data/.gitignore CHANGED
@@ -9,4 +9,5 @@ pkg
9
9
  rdoc
10
10
  Gemfile.lock
11
11
  node_modules
12
- package-lock.json
12
+ package-lock.json
13
+ ai-prompt.erb
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "3.1.0"
2
+ ".": "3.1.1"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@
5
5
 
6
6
  # Change Log
7
7
 
8
+ ## [3.1.1](https://github.com/ruby-git/ruby-git/compare/v3.1.0...v3.1.1) (2025-07-02)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * Raise a Git::FailedError if depth < 0 is passed to Git.clone ([803253e](https://github.com/ruby-git/ruby-git/commit/803253ea2dd2b69b099c0d1919b03ac65c800264)), closes [#805](https://github.com/ruby-git/ruby-git/issues/805)
14
+
15
+
16
+ ### Other Changes
17
+
18
+ * Announce default branch change in README ([e04f08e](https://github.com/ruby-git/ruby-git/commit/e04f08e202ae54286033b4d0a75c47f124bd63e2))
19
+ * Update the project's default branch from 'master' to 'main' ([a5aa75f](https://github.com/ruby-git/ruby-git/commit/a5aa75fd04a71cd8236b8c8481a067c0a47b24b9))
20
+
8
21
  ## [3.1.0](https://github.com/ruby-git/ruby-git/compare/v3.0.2...v3.1.0) (2025-05-18)
9
22
 
10
23
 
data/README.md CHANGED
@@ -8,9 +8,10 @@
8
8
  [![Gem Version](https://badge.fury.io/rb/git.svg)](https://badge.fury.io/rb/git)
9
9
  [![Documentation](https://img.shields.io/badge/Documentation-Latest-green)](https://rubydoc.info/gems/git/)
10
10
  [![Change Log](https://img.shields.io/badge/CHANGELOG-Latest-green)](https://rubydoc.info/gems/git/file/CHANGELOG.md)
11
- [![Build Status](https://github.com/ruby-git/ruby-git/workflows/CI/badge.svg?branch=master)](https://github.com/ruby-git/ruby-git/actions?query=workflow%3ACI)
11
+ [![Build Status](https://github.com/ruby-git/ruby-git/workflows/CI/badge.svg?branch=main)](https://github.com/ruby-git/ruby-git/actions?query=workflow%3ACI)
12
12
  [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
13
13
 
14
+ - [📢 Default Branch Rename 📢](#-default-branch-rename-)
14
15
  - [📢 We've Switched to Conventional Commits 📢](#-weve-switched-to-conventional-commits-)
15
16
  - [Summary](#summary)
16
17
  - [Install](#install)
@@ -21,6 +22,14 @@
21
22
  - [Ruby version support policy](#ruby-version-support-policy)
22
23
  - [License](#license)
23
24
 
25
+ ## 📢 Default Branch Rename 📢
26
+
27
+ On June 6th, 2025, the default branch was renamed from 'master' to 'main'.
28
+
29
+ Instructions for renaming your local or forked branch to match can be found in the
30
+ gist [Default Branch Name
31
+ Change](https://gist.github.com/jcouball/580a10e395f7fdfaaa4297bbe816cc7d).
32
+
24
33
  ## 📢 We've Switched to Conventional Commits 📢
25
34
 
26
35
  To enhance our development workflow, enable automated changelog generation, and pave
@@ -275,8 +284,8 @@ g.branches # returns Git::Branch objects
275
284
  g.branches.local
276
285
  g.current_branch
277
286
  g.branches.remote
278
- g.branches[:master].gcommit
279
- g.branches['origin/master'].gcommit
287
+ g.branches[:main].gcommit
288
+ g.branches['origin/main'].gcommit
280
289
 
281
290
  g.grep('hello') # implies HEAD
282
291
  g.blob('v2.5:Makefile').grep('hello')
@@ -333,7 +342,7 @@ Git.ls_remote('https://github.com/ruby-git/ruby-git.git') # returns a hash conta
333
342
  Git.ls_remote('/path/to/local/repo')
334
343
  Git.ls_remote() # same as Git.ls_remote('.')
335
344
 
336
- Git.default_branch('https://github.com/ruby-git/ruby-git') #=> 'master'
345
+ Git.default_branch('https://github.com/ruby-git/ruby-git') #=> 'main'
337
346
  ```
338
347
 
339
348
  And here are the operations that will need to write to your git repository.
@@ -406,13 +415,13 @@ g.branch('new_branch') # creates new or fetches existing
406
415
  g.branch('new_branch').checkout
407
416
  g.branch('new_branch').delete
408
417
  g.branch('existing_branch').checkout
409
- g.branch('master').contains?('existing_branch')
418
+ g.branch('main').contains?('existing_branch')
410
419
 
411
420
  # delete remote branch
412
421
  g.push('origin', 'remote_branch_name', force: true, delete: true)
413
422
 
414
423
  g.checkout('new_branch')
415
- g.checkout('new_branch', new_branch: true, start_point: 'master')
424
+ g.checkout('new_branch', new_branch: true, start_point: 'main')
416
425
  g.checkout(g.branch('new_branch'))
417
426
 
418
427
  g.branch(name).merge(branch2)
@@ -422,7 +431,7 @@ g.branch(name).in_branch(message) { # add files } # auto-commits
422
431
  g.merge('new_branch')
423
432
  g.merge('new_branch', 'merge commit message', no_ff: true)
424
433
  g.merge('origin/remote_branch')
425
- g.merge(g.branch('master'))
434
+ g.merge(g.branch('main'))
426
435
  g.merge([branch1, branch2])
427
436
 
428
437
  g.merge_base('branch1', 'branch2')
data/lib/git/lib.rb CHANGED
@@ -126,7 +126,7 @@ module Git
126
126
  arr_opts = []
127
127
  arr_opts << '--bare' if opts[:bare]
128
128
  arr_opts << '--branch' << opts[:branch] if opts[:branch]
129
- arr_opts << '--depth' << opts[:depth].to_i if opts[:depth] && opts[:depth].to_i > 0
129
+ arr_opts << '--depth' << opts[:depth].to_i if opts[:depth]
130
130
  arr_opts << '--filter' << opts[:filter] if opts[:filter]
131
131
  Array(opts[:config]).each { |c| arr_opts << '--config' << c }
132
132
  arr_opts << '--origin' << opts[:remote] || opts[:origin] if opts[:remote] || opts[:origin]
data/lib/git/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  module Git
4
4
  # The current gem version
5
5
  # @return [String] the current gem version.
6
- VERSION='3.1.0'
6
+ VERSION='3.1.1'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon and others
@@ -248,8 +248,8 @@ licenses:
248
248
  metadata:
249
249
  homepage_uri: http://github.com/ruby-git/ruby-git
250
250
  source_code_uri: http://github.com/ruby-git/ruby-git
251
- changelog_uri: https://rubydoc.info/gems/git/3.1.0/file/CHANGELOG.md
252
- documentation_uri: https://rubydoc.info/gems/git/3.1.0
251
+ changelog_uri: https://rubydoc.info/gems/git/3.1.1/file/CHANGELOG.md
252
+ documentation_uri: https://rubydoc.info/gems/git/3.1.1
253
253
  rdoc_options: []
254
254
  require_paths:
255
255
  - lib