git 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of git might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b4267b97da7a2024f34b388707eb119370d7006d6606efb8963c4bfde76f460
4
- data.tar.gz: 3383dffa2ff71b075c62bfa40f417e37c082dc78946f2cf4c413d3bdca89a153
3
+ metadata.gz: 4baf98bc2847ece4cb13a4f558b1654facb3c8add9ce58eebb024a139f880742
4
+ data.tar.gz: 9c1448896ab666dbe25c38484074fc81814a53fdb6b5e8eac599f58ebdde713b
5
5
  SHA512:
6
- metadata.gz: 2bd0fdfe6cce4d48a0efe62204350227d4c9eb20f184e6be43cc12811639e3e1ba789a467ab74dd24374ba758d1abd311a1875c13a368fbe28ea42080109b58b
7
- data.tar.gz: cdc75148835d1a68b76681941a28a49955b42729f085f8fdac79dc393c293447099c33748701b86f66c4db1c93344df6a6c668eff72c6c3a2899ca88b65444b3
6
+ metadata.gz: a71409e92d3c79d2c41c2dc693eb031dda63e1d50ddbfcc90c3fea04c30c25341d40a086934f4582f3207fba9a20240c1061ad79a007cdcae19969c9a662c341
7
+ data.tar.gz: 78c864391d9dcc90f238d78cd616e65c7ccc0fddd2ae7d0a206e31f5d5726d4945ceecdb201680c9630bc7123b88696b744ae8a5f0a9094f743ac0473106c4dc
@@ -0,0 +1,25 @@
1
+ # Probot: Stale
2
+ # https://github.com/probot/stale
3
+
4
+ # Number of days of inactivity before an issue becomes stale
5
+ daysUntilStale: 60
6
+
7
+ # Number of days of inactivity before a stale issue is closed
8
+ # Set to false to disable. If disabled, issues still need to be closed
9
+ # manually, but will remain marked as stale.
10
+ daysUntilClose: false
11
+
12
+ # Issues with these labels will never be considered stale
13
+ exemptLabels:
14
+ - pinned
15
+ - security
16
+
17
+ # Label to use when marking an issue as stale
18
+ staleLabel: stale
19
+
20
+ # Comment to post when marking an issue as stale. Set to `false` to disable
21
+ markComment: >
22
+ A friendly reminder that this issue had no activity for 60 days.
23
+
24
+ # Comment to post when closing a stale issue. Set to `false` to disable
25
+ closeComment: false
@@ -0,0 +1,42 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ continuous_integration_build:
11
+ continue-on-error: true
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ ruby: [2.3, 2.7]
16
+ operating-system: [ubuntu-latest]
17
+ include:
18
+ - ruby: head
19
+ operating-system: ubuntu-latest
20
+ - ruby: truffleruby-head
21
+ operating-system: ubuntu-latest
22
+ - ruby: 2.7
23
+ operating-system: windows-latest
24
+ - ruby: jruby-head
25
+ operating-system: windows-latest
26
+
27
+ name: Ruby ${{ matrix.ruby }} on ${{ matrix.operating-system }}
28
+
29
+ runs-on: ${{ matrix.operating-system }}
30
+
31
+ steps:
32
+ - name: Checkout Code
33
+ uses: actions/checkout@v2
34
+
35
+ - name: Setup Ruby
36
+ uses: ruby/setup-ruby@v1
37
+ with:
38
+ ruby-version: ${{ matrix.ruby }}
39
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
40
+
41
+ - name: Run Build
42
+ run: bundle exec rake default
@@ -0,0 +1,10 @@
1
+ *.gem
2
+ *.kpf
3
+ *.sw?
4
+ .DS_Store
5
+ coverage
6
+ doc
7
+ .yardoc
8
+ pkg
9
+ rdoc
10
+ Gemfile.lock
@@ -0,0 +1,11 @@
1
+ --default-return=''
2
+ --hide-void-return
3
+ --markup-provider=redcarpet
4
+ --markup=markdown
5
+ --fail-on-warning
6
+ -
7
+ README.md
8
+ CHANGELOG.md
9
+ CONTRIBUTING.md
10
+ RELEASING.md
11
+ MAINTAINERS.md
@@ -5,6 +5,10 @@
5
5
 
6
6
  # Change Log
7
7
 
8
+ ## 1.8.1
9
+
10
+ See https://github.com/ruby-git/ruby-git/releases/tag/v1.8.1
11
+
8
12
  ## 1.8.0
9
13
 
10
14
  See https://github.com/ruby-git/ruby-git/releases/tag/v1.8.0
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec :name => 'git'
4
+
@@ -0,0 +1,15 @@
1
+ ### Subject of the issue
2
+ Describe your issue here.
3
+
4
+ ### Your environment
5
+ * version of git and ruby-git
6
+ * version of ruby
7
+
8
+ ### Steps to reproduce
9
+ Tell us how to reproduce this issue.
10
+
11
+ ### Expected behaviour
12
+ What did you expect to happen?
13
+
14
+ ### Actual behaviour
15
+ What actually happened?
@@ -0,0 +1,9 @@
1
+ ### Your checklist for this pull request
2
+ 🚨Please review the [guidelines for contributing](https://github.com/ruby-git/ruby-git/blob/master/CONTRIBUTING.md) to this repository.
3
+
4
+ - [ ] Ensure all commits include DCO sign-off.
5
+ - [ ] Ensure that your contributions pass unit testing.
6
+ - [ ] Ensure that your contributions contain documentation if applicable.
7
+
8
+ ### Description
9
+ Please describe your pull request.
@@ -0,0 +1,62 @@
1
+ <!--
2
+ # @markup markdown
3
+ # @title Releasing
4
+ -->
5
+
6
+ # How to release a new git.gem
7
+
8
+ Releasing a new version of the `git` gem requires these steps:
9
+ * [Prepare the release](#prepare-the-release)
10
+ * [Create a GitHub release](#create-a-github-release)
11
+ * [Build and release the gem](#build-and-release-the-gem)
12
+
13
+ These instructions use an example where the current release version is `1.5.0`
14
+ and the new release version to be created is `1.6.0.pre1`.
15
+
16
+ ## Prepare the release
17
+
18
+ From a fork of ruby-git, create a PR containing changes to (1) bump the
19
+ version number, (2) update the CHANGELOG.md, and (3) tag the release.
20
+
21
+ * Bump the version number in lib/git/version.rb following [Semantic Versioning](https://semver.org)
22
+ guidelines
23
+ * Add a link in CHANGELOG.md to the release tag which will be created later
24
+ in this guide
25
+ * Create a new tag using [git-extras](https://github.com/tj/git-extras/blob/master/Commands.md#git-release)
26
+ `git release` command
27
+ * For example: `git release v1.6.0.pre1`
28
+ * These should be the only changes in the PR
29
+ * An example of these changes for `v1.6.0.pre1` can be found in [PR #435](https://github.com/ruby-git/ruby-git/pull/435)
30
+ * Get the PR reviewed, approved and merged to master.
31
+
32
+ ## Create a GitHub release
33
+
34
+ On [the ruby-git releases page](https://github.com/ruby-git/ruby-git/releases),
35
+ select `Draft a new release`
36
+
37
+ * Select the tag corresponding to the version being released `v1.6.0.pre1`
38
+ * The Target should be `master`
39
+ * For the release description, use the output of [changelog-rs](https://github.com/perlun/changelog-rs)
40
+ * Since the release has not been created yet, you will need to supply
41
+ `changeling-rs` with the current release tag and the tag the new release
42
+ is being created from
43
+ * For example: `changelog-rs . v1.5.0 v1.6.0.pre1`
44
+ * Copy the output, omitting the tag header `## v1.6.0.pre1` and paste into
45
+ the release description
46
+ * The release description can be edited later if needed
47
+ * Select the appropriate value for `This is a pre-release`
48
+ * Since `v1.6.0.pre1` is a pre-release, check `This is a pre-release`
49
+
50
+ ## Build and release the gem
51
+
52
+ Clone [ruby-git/ruby-git](https://github.com/ruby-git/ruby-git) directly (not a
53
+ fork) and ensure your local working copy is on the master branch
54
+
55
+ * Verify that you are not on a fork with the command `git remote -v`
56
+ * Verify that the version number is correct by running `rake -T` and inspecting
57
+ the output for the `release[remote]` task
58
+
59
+ Build the git gem and push it to rubygems.org with the command `rake release`
60
+
61
+ * Ensure that your `gem sources list` includes `https://rubygems.org` (in my
62
+ case, I usually have my work’s internal gem repository listed)
@@ -0,0 +1,44 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ require "#{File.expand_path(File.dirname(__FILE__))}/lib/git/version"
4
+
5
+ default_tasks = []
6
+
7
+ desc 'Run Unit Tests'
8
+ task :test do
9
+ sh 'git config --global user.email "git@example.com"' if `git config user.email`.empty?
10
+ sh 'git config --global user.name "GitExample"' if `git config user.name`.empty?
11
+
12
+ require File.dirname(__FILE__) + '/tests/all_tests.rb'
13
+ end
14
+ default_tasks << :test
15
+
16
+ unless RUBY_PLATFORM == 'java'
17
+ #
18
+ # YARD documentation for this project can NOT be built with JRuby.
19
+ # This project uses the redcarpet gem which can not be installed on JRuby.
20
+ #
21
+ require 'yard'
22
+ YARD::Rake::YardocTask.new
23
+ CLEAN << '.yardoc'
24
+ CLEAN << 'doc'
25
+ default_tasks << :yard
26
+
27
+ require 'yardstick/rake/verify'
28
+ Yardstick::Rake::Verify.new(:'yardstick:coverage') do |t|
29
+ t.threshold = 50
30
+ t.require_exact_threshold = false
31
+ end
32
+ default_tasks << :'yardstick:coverage'
33
+
34
+ desc 'Run yardstick to check yard docs'
35
+ task :yardstick do
36
+ sh "yardstick 'lib/**/*.rb'"
37
+ end
38
+ # Do not include yardstick as a default task for now since there are too many
39
+ # warnings. Will work to get the warnings down before re-enabling it.
40
+ #
41
+ # default_tasks << :yardstick
42
+ end
43
+
44
+ task default: default_tasks
@@ -0,0 +1,46 @@
1
+ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
2
+ require 'git/version'
3
+
4
+ Gem::Specification.new do |s|
5
+ s.author = 'Scott Chacon and others'
6
+ s.email = 'schacon@gmail.com'
7
+ s.homepage = 'http://github.com/ruby-git/ruby-git'
8
+ s.license = 'MIT'
9
+ s.name = 'git'
10
+ s.summary = 'An API to create, read, and manipulate Git repositories'
11
+ s.description = <<~DESCRIPTION
12
+ The Git Gem provides an API that can be used to create, read, and manipulate
13
+ Git repositories by wrapping system calls to the `git` binary. The API can be
14
+ used for working with Git in complex interactions including branching and
15
+ merging, object inspection and manipulation, history, patch generation and
16
+ more.
17
+ DESCRIPTION
18
+ s.version = Git::VERSION
19
+
20
+ s.metadata['homepage_uri'] = s.homepage
21
+ s.metadata['source_code_uri'] = s.homepage
22
+ s.metadata['changelog_uri'] = 'http://rubydoc.info/gems/git/file.CHANGELOG.html'
23
+
24
+ s.require_paths = ['lib']
25
+ s.required_ruby_version = '>= 2.3'
26
+ s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to?(:required_rubygems_version=)
27
+ s.requirements = ['git 1.6.0.0, or greater']
28
+
29
+ s.add_runtime_dependency 'rchardet', '~> 1.8'
30
+
31
+ s.add_development_dependency 'minitar', '~> 0.9'
32
+ s.add_development_dependency 'rake', '~> 13.0'
33
+ s.add_development_dependency 'test-unit', '~> 3.3'
34
+
35
+ unless RUBY_PLATFORM == 'java'
36
+ s.add_development_dependency 'redcarpet', '~> 3.5'
37
+ s.add_development_dependency 'yard', '~> 0.9'
38
+ s.add_development_dependency 'yardstick', '~> 0.9'
39
+ end
40
+
41
+ # Specify which files should be added to the gem when it is released.
42
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
43
+ s.files = Dir.chdir(File.expand_path(__dir__)) do
44
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(tests|spec|features)/}) }
45
+ end
46
+ end
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  # The current gem version
3
3
  # @return [String] the current gem version.
4
- VERSION='1.8.0'
4
+ VERSION='1.8.1'
5
5
  end
@@ -0,0 +1,38 @@
1
+ require 'git/path'
2
+
3
+ module Git
4
+
5
+ class Worktree < Path
6
+
7
+ attr_accessor :full, :dir, :gcommit
8
+
9
+ def initialize(base, dir, gcommit = nil)
10
+ @full = dir
11
+ @full += ' ' + gcommit if !gcommit.nil?
12
+ @base = base
13
+ @dir = dir
14
+ @gcommit = gcommit
15
+ end
16
+
17
+ def gcommit
18
+ @gcommit ||= @base.gcommit(@full)
19
+ @gcommit
20
+ end
21
+
22
+ def add
23
+ @base.lib.worktree_add(@dir, @gcommit)
24
+ end
25
+
26
+ def remove
27
+ @base.lib.worktree_remove(@dir)
28
+ end
29
+
30
+ def to_a
31
+ [@full]
32
+ end
33
+
34
+ def to_s
35
+ @full
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,47 @@
1
+ module Git
2
+ # object that holds all the available worktrees
3
+ class Worktrees
4
+
5
+ include Enumerable
6
+
7
+ def initialize(base)
8
+ @worktrees = {}
9
+
10
+ @base = base
11
+
12
+ # Array contains [dir, git_hash]
13
+ @base.lib.worktrees_all.each do |w|
14
+ @worktrees[w[0]] = Git::Worktree.new(@base, w[0], w[1])
15
+ end
16
+ end
17
+
18
+ # array like methods
19
+
20
+ def size
21
+ @worktrees.size
22
+ end
23
+
24
+ def each(&block)
25
+ @worktrees.values.each(&block)
26
+ end
27
+
28
+ def [](worktree_name)
29
+ @worktrees.values.inject(@worktrees) do |worktrees, worktree|
30
+ worktrees[worktree.full] ||= worktree
31
+ worktrees
32
+ end[worktree_name.to_s]
33
+ end
34
+
35
+ def to_s
36
+ out = ''
37
+ @worktrees.each do |k, b|
38
+ out << b.to_s << "\n"
39
+ end
40
+ out
41
+ end
42
+
43
+ def prune
44
+ @base.lib.worktree_prune
45
+ end
46
+ end
47
+ 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: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon and others
@@ -119,11 +119,21 @@ executables: []
119
119
  extensions: []
120
120
  extra_rdoc_files: []
121
121
  files:
122
+ - ".github/stale.yml"
123
+ - ".github/workflows/continuous_integration.yml"
124
+ - ".gitignore"
125
+ - ".yardopts"
122
126
  - CHANGELOG.md
123
127
  - CONTRIBUTING.md
128
+ - Gemfile
129
+ - ISSUE_TEMPLATE.md
124
130
  - LICENSE
125
131
  - MAINTAINERS.md
132
+ - PULL_REQUEST_TEMPLATE.md
126
133
  - README.md
134
+ - RELEASING.md
135
+ - Rakefile
136
+ - git.gemspec
127
137
  - lib/git.rb
128
138
  - lib/git/author.rb
129
139
  - lib/git/base.rb
@@ -144,6 +154,8 @@ files:
144
154
  - lib/git/status.rb
145
155
  - lib/git/version.rb
146
156
  - lib/git/working_directory.rb
157
+ - lib/git/worktree.rb
158
+ - lib/git/worktrees.rb
147
159
  homepage: http://github.com/ruby-git/ruby-git
148
160
  licenses:
149
161
  - MIT