rjgit 5.4.0.0 → 5.4.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39f8a936a67ceeab8a72588eb9cbe80b204ff8ecfa2b8b9b62692e87947d33d6
|
4
|
+
data.tar.gz: 621f246226c7347df618fdc412694227f92ac0ac9c4431e292a509ea2f71480f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e3136e29b1eaa3fcecc91ef654b73406a4271d5d26b2fed9ad4aa63c0af3e79cfc13f78eb7123524054c9d56d498d59576d9057847b168a4988ee7133a7b361
|
7
|
+
data.tar.gz: 991d9fa265d23da1159cb8137aca135995b04cc56d3060bf0babb136168d00cff827cb73cc18f52c500d411254437603a7067e013e6e7e8287daa0dbfb86f2a4
|
data/lib/commit.rb
CHANGED
@@ -40,9 +40,11 @@ module RJGit
|
|
40
40
|
df = DiffFormatter.new(DisabledOutputStream::INSTANCE)
|
41
41
|
df.set_repository(@jrepo)
|
42
42
|
df.set_context(0)
|
43
|
+
df.set_detect_renames(true)
|
43
44
|
parent_commit = @jcommit.parent_count > 0 ? @jcommit.get_parents[0] : nil
|
44
45
|
entries = df.scan(parent_commit, @jcommit)
|
45
|
-
|
46
|
+
|
47
|
+
results = []
|
46
48
|
total_del = 0
|
47
49
|
total_ins = 0
|
48
50
|
entries.each do |entry|
|
@@ -57,9 +59,19 @@ module RJGit
|
|
57
59
|
end
|
58
60
|
total_del += del
|
59
61
|
total_ins += ins
|
60
|
-
results
|
62
|
+
results << {
|
63
|
+
:new_file => file.getNewPath,
|
64
|
+
:old_file => file.getOldPath,
|
65
|
+
:new_additions => ins,
|
66
|
+
:new_deletions => del,
|
67
|
+
:changes => ins + del
|
68
|
+
}
|
61
69
|
end
|
62
|
-
return
|
70
|
+
return {
|
71
|
+
:total_additions => total_ins,
|
72
|
+
:total_deletions => total_del,
|
73
|
+
:files => results
|
74
|
+
}
|
63
75
|
end
|
64
76
|
|
65
77
|
def diff(options = {})
|
@@ -95,7 +107,7 @@ module RJGit
|
|
95
107
|
walk = RevWalk.new(repository)
|
96
108
|
objhead = repository.resolve(Constants::HEAD)
|
97
109
|
return Commit.new(repository, walk.parseCommit(objhead))
|
98
|
-
rescue
|
110
|
+
rescue java.lang.NullPointerException => e
|
99
111
|
return nil
|
100
112
|
end
|
101
113
|
end
|
@@ -110,7 +122,7 @@ module RJGit
|
|
110
122
|
walk.mark_start(root)
|
111
123
|
commits = walk.map { |commit| Commit.new(repository, commit) }
|
112
124
|
return commits.first(options[:limit])
|
113
|
-
rescue
|
125
|
+
rescue java.lang.NullPointerException => e
|
114
126
|
return Array.new
|
115
127
|
end
|
116
128
|
end
|
data/lib/git.rb
CHANGED
@@ -267,7 +267,8 @@ module RJGit
|
|
267
267
|
|
268
268
|
def checkout(branch_name = "master", options = {})
|
269
269
|
checkout_command = @jgit.checkout.set_name(branch_name)
|
270
|
-
|
270
|
+
# call :setStartPoint directly to avoid ambiguity warning
|
271
|
+
checkout_command.java_send :setStartPoint, [RevCommit], options[:commit]
|
271
272
|
options[:paths].each {|path| checkout_command.add_path(path)} if options[:paths]
|
272
273
|
checkout_command.set_create_branch(true) if options[:create]
|
273
274
|
checkout_command.set_force(true) if options[:force]
|
@@ -376,8 +377,8 @@ module RJGit
|
|
376
377
|
fetch_command.set_thin(true) if options[:thin]
|
377
378
|
fetch_command.set_check_fetched_objects(true) if options[:check_fetched_objects]
|
378
379
|
fetch_command.set_remove_deleted_refs(true) if options[:remove_deleted_refs]
|
379
|
-
fetch_command.set_ref_specs(RefSpec.new(options[:refspecs])) if options[:refspecs]
|
380
380
|
fetch_command.set_remote(remote) if remote
|
381
|
+
fetch_command.set_ref_specs(options[:refspecs]) if options[:refspecs]
|
381
382
|
self.class.set_command_transport(fetch_command, remote, options)
|
382
383
|
fetch_command.call
|
383
384
|
end
|
Binary file
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rjgit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.4.
|
4
|
+
version: 5.4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maarten Engelen
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2019-
|
15
|
+
date: 2019-09-17 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ files:
|
|
49
49
|
- lib/java/jars/bcpkix-jdk15on-161.jar
|
50
50
|
- lib/java/jars/bcprov-jdk15on-161.jar
|
51
51
|
- lib/java/jars/jsch-0.1.54.jar
|
52
|
-
- lib/java/jars/org.eclipse.jgit-5.4.
|
52
|
+
- lib/java/jars/org.eclipse.jgit-5.4.2.201908231537-r.jar
|
53
53
|
- lib/java/jars/slf4j-api-1.7.2.jar
|
54
54
|
- lib/java/jars/slf4j-simple-1.7.12.jar
|
55
55
|
- lib/repo.rb
|