git-branch-delete-orphans 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/bin/git-branch-delete-orphans +20 -2
- data/git-branch-delete-orphans.gemspec +1 -1
- data/lib/git-branch-delete-orphans/version.rb +1 -1
- metadata +21 -5
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 0.1.0
|
4
|
+
|
5
|
+
* Better error messages when not ran in a git repo. PR [#7][] by [@pvdb][]
|
6
|
+
|
3
7
|
## Version 0.0.5
|
4
8
|
|
5
9
|
* Highlight branch. PR [#5][] by [@pvdb][]
|
@@ -22,11 +26,13 @@
|
|
22
26
|
## Version 0.0.1
|
23
27
|
|
24
28
|
* Initial version by [@pcreux][]
|
29
|
+
|
25
30
|
<!--- The following link definition list is generated by PimpMyChangelog --->
|
26
31
|
[#2]: https://github.com/pcreux/git/issues/2
|
27
32
|
[#3]: https://github.com/pcreux/git/issues/3
|
28
33
|
[#4]: https://github.com/pcreux/git/issues/4
|
29
34
|
[#5]: https://github.com/pcreux/git/issues/5
|
35
|
+
[#7]: https://github.com/pcreux/git/issues/7
|
30
36
|
[@pcreux]: https://github.com/pcreux
|
31
37
|
[@pvdb]: https://github.com/pvdb
|
32
38
|
[@waynemoore]: https://github.com/waynemoore
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ remote does not exist anymore and prompts you to delete them.
|
|
17
17
|
Listing remote branches...
|
18
18
|
From git@git.versapay.com:eft3
|
19
19
|
|
20
|
-
The following branches track a remote branch
|
20
|
+
The following branches track a remote branch whose does not exist anymore:
|
21
21
|
- inbound_outbound_balances
|
22
22
|
- 6956-refactor-login-for-checkout
|
23
23
|
- 6141-set-timezone-to-PST
|
@@ -55,5 +55,23 @@ def cli(orphans)
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
|
59
|
-
|
58
|
+
git_dir = `git rev-parse --git-dir`.chomp
|
59
|
+
|
60
|
+
if $?.success?
|
61
|
+
|
62
|
+
# step 1: change to the root of the git repo
|
63
|
+
Dir.chdir File.dirname(git_dir)
|
64
|
+
|
65
|
+
# step 2: calculate the orphaned branches
|
66
|
+
orphans = locals - remotes
|
67
|
+
|
68
|
+
# step 3: action the orphans
|
69
|
+
cli(orphans)
|
70
|
+
|
71
|
+
else
|
72
|
+
|
73
|
+
puts "Please run #{File.basename __FILE__} from inside a git repo"
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
# That's all, Folks!
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
21
|
# specify any dependencies here; for example:
|
22
|
-
|
22
|
+
s.add_development_dependency "rake"
|
23
23
|
# s.add_runtime_dependency "rest-client"
|
24
24
|
s.add_runtime_dependency "rainbow"
|
25
25
|
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.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-07-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: &70284956262780 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70284956262780
|
14
25
|
- !ruby/object:Gem::Dependency
|
15
26
|
name: rainbow
|
16
|
-
requirement: &
|
27
|
+
requirement: &70284956261980 !ruby/object:Gem::Requirement
|
17
28
|
none: false
|
18
29
|
requirements:
|
19
30
|
- - ! '>='
|
@@ -21,7 +32,7 @@ dependencies:
|
|
21
32
|
version: '0'
|
22
33
|
type: :runtime
|
23
34
|
prerelease: false
|
24
|
-
version_requirements: *
|
35
|
+
version_requirements: *70284956261980
|
25
36
|
description: ! '`git branch-delete-orphans` lists orphan tracking branches and prompts
|
26
37
|
you to delete or keep them.'
|
27
38
|
email:
|
@@ -52,12 +63,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
52
63
|
- - ! '>='
|
53
64
|
- !ruby/object:Gem::Version
|
54
65
|
version: '0'
|
66
|
+
segments:
|
67
|
+
- 0
|
68
|
+
hash: 2295524271466893507
|
55
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
70
|
none: false
|
57
71
|
requirements:
|
58
72
|
- - ! '>='
|
59
73
|
- !ruby/object:Gem::Version
|
60
74
|
version: '0'
|
75
|
+
segments:
|
76
|
+
- 0
|
77
|
+
hash: 2295524271466893507
|
61
78
|
requirements: []
|
62
79
|
rubyforge_project:
|
63
80
|
rubygems_version: 1.8.11
|
@@ -65,4 +82,3 @@ signing_key:
|
|
65
82
|
specification_version: 3
|
66
83
|
summary: Delete tracking branches which remote branch does not exist anymore.
|
67
84
|
test_files: []
|
68
|
-
has_rdoc:
|