git-visualiser 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/application/visualisation.rb +7 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTU1YTFlNmRmZjg1ZDVlZjViODI3Nzk5YzM5NzAyZjFiYzY3YWMzNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTliMWUzMTZkM2FhNzIwZTE1ZDUzZTI1ZDhkYjQ3ZDFkMmY2NzhjYw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDdiMWJjMzI4M2FkM2YzYmQxM2YxM2VjYmI0MTYxMGJhZTc1NDNkODY4NTg5
|
10
|
+
ZGE1ODA1NTY3NDQ0N2ZlNTlhNGY5ZGQ5NmVlMzZhOWNlMzA0Y2E0YjQ4MzQ4
|
11
|
+
NzhjMGY5ZjI1YzU3YzVmZDJmNGYwYjFlMmJiMzQzOWMwZWU4ZGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2Q4ZTlkNDc4NDJhYjQxNTBlZGU3ODViMTE3NjczNzI5ZDk5Mzk1NTFhZTFm
|
14
|
+
NjcyYzIzMzE0YzRjZWQxZTMzZDE2M2RkZWYzODRlN2UzNjQ3MmQzNjA3ZTBi
|
15
|
+
NzU1NmFmMjhjMmQzZmZmMGY5MjZkZDRmODNhMDJmYzRkZTU2MzE=
|
@@ -7,7 +7,7 @@ module Visualisation
|
|
7
7
|
total_additions = total_deletions = 0
|
8
8
|
remotes_arr = Visualisation.remotes
|
9
9
|
Visualisation.branches_with_remotes.each do |branch|
|
10
|
-
|
10
|
+
puts "#{branch}"
|
11
11
|
diff = Visualisation.branch_diff_size(branch)
|
12
12
|
head_commit = Visualisation.head_commit_sha(branch)
|
13
13
|
merged_with_master = Visualisation.branch_contains_commit("master", head_commit)
|
@@ -22,7 +22,8 @@ module Visualisation
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.branches_with_remotes
|
25
|
-
`git branch -a`.split("\n").each { |b| b.gsub!(/[*]?\s/, '') and b.gsub!(/remotes\//, '') }
|
25
|
+
`git branch -a`.split("\n").each { |b| b.gsub!(/[*]?\s/, '') and b.gsub!(/remotes\//, '') }
|
26
|
+
.delete_if { |b| b.include?('->') }
|
26
27
|
end
|
27
28
|
|
28
29
|
def self.remotes
|
@@ -60,19 +61,16 @@ module Visualisation
|
|
60
61
|
|
61
62
|
def self.repo_branches_merged(show_remotes = true)
|
62
63
|
merged_branches = {}
|
63
|
-
checked_branches = []
|
64
64
|
compare_branches = branches_with_remotes
|
65
|
-
compare_branches.
|
65
|
+
compare_branches.each do |b1|
|
66
66
|
b1_merges = {}
|
67
|
-
compare_branches.
|
68
|
-
next if
|
67
|
+
compare_branches.each do |b2|
|
68
|
+
next if b1 == b2 || b2.split("/").last == b1 ||
|
69
69
|
(merged_branches.has_key?(b2.to_sym) && merged_branches[b2.to_sym].has_key?(b1.to_sym))
|
70
|
-
# (checked_branches[i] && checked_branches[i].include?(j)
|
71
|
-
# puts "comparing branches #{b1} and #{b2}"
|
72
70
|
directions = {}
|
71
|
+
puts "comparing #{b1} with #{b2}"
|
73
72
|
directions.merge!(:left => true) if branch_merged_with_base?(b1, b2, remotes)
|
74
73
|
directions.merge!(:right => true) if right = branch_merged_with_base?(b2, b1, remotes)
|
75
|
-
|
76
74
|
b1_merges.merge!(b2.to_sym => directions)
|
77
75
|
end
|
78
76
|
merged_branches.merge!(b1.to_sym => b1_merges)
|