git-branch-delete-orphans 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 0.1.1
4
+
5
+ * Don't generate superfluous output. PR [#8][] by [@pvdb][]
6
+
3
7
  ## Version 0.1.0
4
8
 
5
9
  * Better error messages when not ran in a git repo. PR [#7][] by [@pvdb][]
@@ -35,4 +39,4 @@
35
39
  [#7]: https://github.com/pcreux/git/issues/7
36
40
  [@pcreux]: https://github.com/pcreux
37
41
  [@pvdb]: https://github.com/pvdb
38
- [@waynemoore]: https://github.com/waynemoore
42
+ [@waynemoore]: https://github.com/waynemoore
@@ -14,8 +14,7 @@ require 'rainbow'
14
14
  end
15
15
 
16
16
  def remotes
17
- puts "Listing remote branches..."
18
- @remote ||= `git ls-remote | grep 'refs/heads'`.split("\n").map { |l| l.gsub(/^.*refs\/heads\//, '').strip }
17
+ @remote ||= `git ls-remote -q | grep 'refs/heads'`.split("\n").map { |l| l.gsub(/^.*refs\/heads\//, '').strip }
19
18
  end
20
19
 
21
20
  def locals
@@ -23,12 +22,6 @@ def locals
23
22
  end
24
23
 
25
24
  def cli(orphans)
26
- puts ""
27
-
28
- if orphans.empty?
29
- puts "No orphaned local branches, nothing to do."
30
- exit
31
- end
32
25
 
33
26
  puts "The following branches track a remote branch which does not exist anymore:"
34
27
  orphans.each { |b| puts " - #{b}" }
@@ -66,7 +59,7 @@ if $?.success?
66
59
  orphans = locals - remotes
67
60
 
68
61
  # step 3: action the orphans
69
- cli(orphans)
62
+ cli(orphans) unless orphans.empty?
70
63
 
71
64
  else
72
65
 
@@ -2,7 +2,7 @@ module Git
2
2
  module Branch
3
3
  module Delete
4
4
  module Orphans
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-branch-delete-orphans
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-10 00:00:00.000000000 Z
12
+ date: 2013-08-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70284956262780 !ruby/object:Gem::Requirement
16
+ requirement: &70225943659600 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70284956262780
24
+ version_requirements: *70225943659600
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rainbow
27
- requirement: &70284956261980 !ruby/object:Gem::Requirement
27
+ requirement: &70225943674240 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70284956261980
35
+ version_requirements: *70225943674240
36
36
  description: ! '`git branch-delete-orphans` lists orphan tracking branches and prompts
37
37
  you to delete or keep them.'
38
38
  email:
@@ -65,7 +65,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
65
65
  version: '0'
66
66
  segments:
67
67
  - 0
68
- hash: 2295524271466893507
68
+ hash: -1296555995339146358
69
69
  required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  none: false
71
71
  requirements:
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  segments:
76
76
  - 0
77
- hash: 2295524271466893507
77
+ hash: -1296555995339146358
78
78
  requirements: []
79
79
  rubyforge_project:
80
80
  rubygems_version: 1.8.11