git 1.6.0 → 1.9.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 +4 -4
- data/.github/stale.yml +25 -0
- data/.github/workflows/continuous_integration.yml +45 -0
- data/.gitignore +10 -0
- data/.yardopts +11 -0
- data/CHANGELOG.md +25 -0
- data/CONTRIBUTING.md +14 -7
- data/Gemfile +4 -0
- data/ISSUE_TEMPLATE.md +15 -0
- data/MAINTAINERS.md +5 -0
- data/PULL_REQUEST_TEMPLATE.md +9 -0
- data/README.md +268 -215
- data/RELEASING.md +62 -0
- data/Rakefile +56 -0
- data/git.gemspec +46 -0
- data/lib/git.rb +180 -41
- data/lib/git/base.rb +198 -152
- data/lib/git/base/factory.rb +40 -22
- data/lib/git/diff.rb +6 -5
- data/lib/git/lib.rb +222 -71
- data/lib/git/log.rb +8 -1
- data/lib/git/status.rb +1 -1
- data/lib/git/version.rb +1 -1
- data/lib/git/worktree.rb +38 -0
- data/lib/git/worktrees.rb +47 -0
- metadata +86 -33
data/lib/git/log.rb
CHANGED
@@ -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
|
|
data/lib/git/status.rb
CHANGED
data/lib/git/version.rb
CHANGED
data/lib/git/worktree.rb
ADDED
@@ -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,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.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:
|
11
|
+
date: 2021-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rchardet
|
@@ -25,65 +25,115 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: minitar
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '0.9'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '0.9'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: test-unit
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
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
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.5'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
60
81
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
62
|
-
|
82
|
+
version: '3.5'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: yard
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
63
88
|
- !ruby/object:Gem::Version
|
64
|
-
version: '
|
89
|
+
version: '0.9'
|
65
90
|
type: :development
|
66
91
|
prerelease: false
|
67
92
|
version_requirements: !ruby/object:Gem::Requirement
|
68
93
|
requirements:
|
69
|
-
- - "
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.9'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: yardstick
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
70
102
|
- !ruby/object:Gem::Version
|
71
|
-
version: '
|
72
|
-
|
103
|
+
version: '0.9'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
73
109
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
75
|
-
description:
|
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.
|
76
117
|
email: schacon@gmail.com
|
77
118
|
executables: []
|
78
119
|
extensions: []
|
79
|
-
extra_rdoc_files:
|
80
|
-
- README.md
|
120
|
+
extra_rdoc_files: []
|
81
121
|
files:
|
122
|
+
- ".github/stale.yml"
|
123
|
+
- ".github/workflows/continuous_integration.yml"
|
124
|
+
- ".gitignore"
|
125
|
+
- ".yardopts"
|
82
126
|
- CHANGELOG.md
|
83
127
|
- CONTRIBUTING.md
|
128
|
+
- Gemfile
|
129
|
+
- ISSUE_TEMPLATE.md
|
84
130
|
- LICENSE
|
85
131
|
- MAINTAINERS.md
|
132
|
+
- PULL_REQUEST_TEMPLATE.md
|
86
133
|
- README.md
|
134
|
+
- RELEASING.md
|
135
|
+
- Rakefile
|
136
|
+
- git.gemspec
|
87
137
|
- lib/git.rb
|
88
138
|
- lib/git/author.rb
|
89
139
|
- lib/git/base.rb
|
@@ -104,20 +154,24 @@ files:
|
|
104
154
|
- lib/git/status.rb
|
105
155
|
- lib/git/version.rb
|
106
156
|
- lib/git/working_directory.rb
|
157
|
+
- lib/git/worktree.rb
|
158
|
+
- lib/git/worktrees.rb
|
107
159
|
homepage: http://github.com/ruby-git/ruby-git
|
108
160
|
licenses:
|
109
161
|
- MIT
|
110
|
-
metadata:
|
111
|
-
|
112
|
-
|
113
|
-
|
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: []
|
114
168
|
require_paths:
|
115
169
|
- lib
|
116
170
|
required_ruby_version: !ruby/object:Gem::Requirement
|
117
171
|
requirements:
|
118
172
|
- - ">="
|
119
173
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
174
|
+
version: '2.3'
|
121
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
176
|
requirements:
|
123
177
|
- - ">="
|
@@ -125,9 +179,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
179
|
version: '0'
|
126
180
|
requirements:
|
127
181
|
- git 1.6.0.0, or greater
|
128
|
-
rubygems_version: 3.
|
129
|
-
signing_key:
|
182
|
+
rubygems_version: 3.2.15
|
183
|
+
signing_key:
|
130
184
|
specification_version: 4
|
131
|
-
summary:
|
132
|
-
Git repositories by wrapping system calls to the git binary.
|
185
|
+
summary: An API to create, read, and manipulate Git repositories
|
133
186
|
test_files: []
|