git 1.5.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.

@@ -18,6 +18,7 @@ module Git
18
18
  @skip = nil
19
19
  @until = nil
20
20
  @between = nil
21
+ @cherry = nil
21
22
  end
22
23
 
23
24
  def object(objectish)
@@ -67,6 +68,12 @@ module Git
67
68
  @between = [sha1, sha2]
68
69
  return self
69
70
  end
71
+
72
+ def cherry
73
+ dirty_log
74
+ @cherry = true
75
+ return self
76
+ end
70
77
 
71
78
  def to_s
72
79
  self.map { |c| c.to_s }.join("\n")
@@ -119,7 +126,7 @@ module Git
119
126
  log = @base.lib.full_log_commits(:count => @count, :object => @object,
120
127
  :path_limiter => @path, :since => @since,
121
128
  :author => @author, :grep => @grep, :skip => @skip,
122
- :until => @until, :between => @between)
129
+ :until => @until, :between => @between, :cherry => @cherry)
123
130
  @commits = log.map { |c| Git::Object::Commit.new(@base, c['sha'], c) }
124
131
  end
125
132
 
@@ -104,7 +104,7 @@ module Git
104
104
  end
105
105
 
106
106
  def pretty_file(file)
107
- <<-FILE.strip_heredoc
107
+ <<~FILE
108
108
  #{file.path}
109
109
  \tsha(r) #{file.sha_repo} #{file.mode_repo}
110
110
  \tsha(i) #{file.sha_index} #{file.mode_index}
@@ -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.5.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,75 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon and others
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-10 00:00:00.000000000 Z
11
+ date: 2020-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: rchardet
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.8'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitar
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
- - - ">="
31
+ - - "~>"
18
32
  - !ruby/object:Gem::Version
19
- version: '0'
33
+ version: '0.9'
20
34
  type: :development
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
- - - ">="
38
+ - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: '0'
40
+ version: '0.9'
27
41
  - !ruby/object:Gem::Dependency
28
- name: rdoc
42
+ name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - ">="
45
+ - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: '0'
47
+ version: '13.0'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - ">="
52
+ - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: '0'
54
+ version: '13.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: test-unit
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ">="
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: redcarpet
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
46
74
  - !ruby/object:Gem::Version
47
- version: '2'
48
- - - "<"
75
+ version: '3.5'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.5'
83
+ - !ruby/object:Gem::Dependency
84
+ name: yard
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
49
88
  - !ruby/object:Gem::Version
50
- version: '4'
89
+ version: '0.9'
51
90
  type: :development
52
91
  prerelease: false
53
92
  version_requirements: !ruby/object:Gem::Requirement
54
93
  requirements:
55
- - - ">="
94
+ - - "~>"
56
95
  - !ruby/object:Gem::Version
57
- version: '2'
58
- - - "<"
96
+ version: '0.9'
97
+ - !ruby/object:Gem::Dependency
98
+ name: yardstick
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
59
102
  - !ruby/object:Gem::Version
60
- version: '4'
61
- description:
103
+ version: '0.9'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.9'
111
+ description: |
112
+ The Git Gem provides an API that can be used to create, read, and manipulate
113
+ Git repositories by wrapping system calls to the `git` binary. The API can be
114
+ used for working with Git in complex interactions including branching and
115
+ merging, object inspection and manipulation, history, patch generation and
116
+ more.
62
117
  email: schacon@gmail.com
63
118
  executables: []
64
119
  extensions: []
65
- extra_rdoc_files:
66
- - README.md
120
+ extra_rdoc_files: []
67
121
  files:
122
+ - ".github/stale.yml"
123
+ - ".github/workflows/continuous_integration.yml"
124
+ - ".gitignore"
125
+ - ".yardopts"
68
126
  - CHANGELOG.md
69
127
  - CONTRIBUTING.md
128
+ - Gemfile
129
+ - ISSUE_TEMPLATE.md
70
130
  - LICENSE
71
131
  - MAINTAINERS.md
132
+ - PULL_REQUEST_TEMPLATE.md
72
133
  - README.md
134
+ - RELEASING.md
135
+ - Rakefile
136
+ - git.gemspec
73
137
  - lib/git.rb
74
138
  - lib/git/author.rb
75
139
  - lib/git/base.rb
@@ -90,20 +154,24 @@ files:
90
154
  - lib/git/status.rb
91
155
  - lib/git/version.rb
92
156
  - lib/git/working_directory.rb
157
+ - lib/git/worktree.rb
158
+ - lib/git/worktrees.rb
93
159
  homepage: http://github.com/ruby-git/ruby-git
94
160
  licenses:
95
161
  - MIT
96
- metadata: {}
97
- post_install_message:
98
- rdoc_options:
99
- - "--charset=UTF-8"
162
+ metadata:
163
+ homepage_uri: http://github.com/ruby-git/ruby-git
164
+ source_code_uri: http://github.com/ruby-git/ruby-git
165
+ changelog_uri: http://rubydoc.info/gems/git/file.CHANGELOG.html
166
+ post_install_message:
167
+ rdoc_options: []
100
168
  require_paths:
101
169
  - lib
102
170
  required_ruby_version: !ruby/object:Gem::Requirement
103
171
  requirements:
104
172
  - - ">="
105
173
  - !ruby/object:Gem::Version
106
- version: '1.9'
174
+ version: '2.3'
107
175
  required_rubygems_version: !ruby/object:Gem::Requirement
108
176
  requirements:
109
177
  - - ">="
@@ -111,10 +179,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
179
  version: '0'
112
180
  requirements:
113
181
  - git 1.6.0.0, or greater
114
- rubyforge_project:
115
- rubygems_version: 2.7.6
116
- signing_key:
182
+ rubygems_version: 3.1.4
183
+ signing_key:
117
184
  specification_version: 4
118
- summary: Ruby/Git is a Ruby library that can be used to create, read and manipulate
119
- Git repositories by wrapping system calls to the git binary.
185
+ summary: An API to create, read, and manipulate Git repositories
120
186
  test_files: []