git-bundle 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb0b6f61ddf85b02b7d6049c0455d718b914bcb15c064400ada6282cc800cc77
4
- data.tar.gz: 3695a550182f8fe959fe2c49f74d423a289ed856e1966e3121af81881b3152e8
3
+ metadata.gz: 12b776d0338d7edbb3ecb6a8e6c41f5489778f61e0d1bd5304d2dd131eb56371
4
+ data.tar.gz: e03aa0c6178a9c3a2a15e2f2103381226df4aba8e1da657aa00e8b74ef5f6b6d
5
5
  SHA512:
6
- metadata.gz: db48f086741a74993f3da2ed97c581a0a221e24e9ffdb4a058d2bba17005b91bb70ad07ca33419ba32084d3a0c23480f9fa289faeaabd3fd48ff72d709920c4d
7
- data.tar.gz: b47410c2d9d88815d06c590cd28b18b5fbd66a6fd39ac57575c30a49dd5f64d494b6a88aa5071a1f3f1de9cff3d34a06057d82070bd89766a4f6eb5931770571
6
+ metadata.gz: b137c0527c447066095068e005691b3e186fd21e7048513d91411795a20925f8cb4c7ad19daf34a4d4f048199d087d37065d67e5b5f4d5602f085e64c797850d
7
+ data.tar.gz: f6fa7c3fabcee252b780bcbbb476c260ddd634fea984b57d089538e70fcffa8de94999494ee78b81dede17f862b2b6b2a65425b7a73e4aac609fda58bb6b4482
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git-bundle (1.0.13)
4
+ git-bundle (1.0.14)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -66,6 +66,7 @@ module GitBundle
66
66
  end
67
67
 
68
68
  private
69
+
69
70
  def prompt_confirm
70
71
  if @project.main_repository.file_changed?('Gemfile')
71
72
  puts_error 'Your Gemfile has uncommitted changes. Commit them first before pushing.'
@@ -74,6 +75,7 @@ module GitBundle
74
75
 
75
76
  commits_to_push = false
76
77
  upstream_branches_missing = []
78
+ diverged_repos = []
77
79
  @project.repositories.each do |repo|
78
80
  commits = repo.commits_not_pushed
79
81
  puts_repo_heading(repo)
@@ -83,6 +85,7 @@ module GitBundle
83
85
  puts 'No changes.'
84
86
  else
85
87
  commits_to_push = true
88
+ diverged_repos << repo if repo.branch != @project.main_repository.branch
86
89
  puts commits
87
90
  end
88
91
  else
@@ -91,6 +94,17 @@ module GitBundle
91
94
  end
92
95
  end
93
96
 
97
+ if diverged_repos.any?
98
+ puts_prompt("\nThese repositories have changes and have diverged from the main application's branch (#{@project.main_repository.branch})")
99
+ puts_diverged_repos(diverged_repos)
100
+ puts_prompt("\nDo you want to continue? (Y/N)")
101
+ if STDIN.getch.upcase == 'Y'
102
+ puts ''
103
+ else
104
+ return false
105
+ end
106
+ end
107
+
94
108
  if !upstream_branches_missing.empty?
95
109
  puts_prompt("Missing upstream branches (#{upstream_branches_missing.join(', ')}) will be created and changes pushed.")
96
110
  puts_prompt('Do you want to continue? (Y/N)')
@@ -23,6 +23,10 @@ module GitBundle
23
23
  puts colorize("\n=== #{repo.name} (#{repo.branch} ⇒ #{new_branch})", COLORS[:heading], true)
24
24
  end
25
25
 
26
+ def puts_diverged_repos(repos)
27
+ repos.each { |repo| puts colorize(" #{repo.name} (#{repo.branch})", COLORS[:prompt], true) }
28
+ end
29
+
26
30
  def puts_heading(text)
27
31
  puts colorize("\n=== #{text}", COLORS[:heading])
28
32
  end
@@ -88,6 +92,7 @@ module GitBundle
88
92
  end
89
93
 
90
94
  private
95
+
91
96
  def colorize(text, color_code, bold = false)
92
97
  if bold
93
98
  "\e[1m\e[#{color_code}m#{text}\e[0m"
@@ -96,4 +101,4 @@ module GitBundle
96
101
  end
97
102
  end
98
103
  end
99
- end
104
+ end
@@ -1,3 +1,3 @@
1
1
  module GitBundle
2
- VERSION = '1.0.14'
2
+ VERSION = '1.0.15'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-bundle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.14
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Pretorius
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-25 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler